Meson build system overhaul / refactor
This simplifies a lot of things that were unnecessarily clunky, and also splits up the code to move stuff into per-subsystem meson.build
files, where they should belong.
Partially written with the overall goal of fixing #224 (closed) in mind.