Move the XQuartz implementation to extend/os/mac/requirements.
Split the core requirement class into generic, Linux-specific, and macOS-specific parts. Additionally, the Linux version is now able to detect Java versions (the previous Linuxbrew implementation was only able to detect if Java was present at all.)