Refactor the build system

This changes everything. It works for me.

The reason why this has been sleeping for a while is that I was going to try cross compiling stuff, but alas, VapourSynth can’t be built with MinGW/GCC anyway because it uses a few unsupported C++11 features and incorrect case for header file names.