Use only one aligned alloc function
Use only one aligned alloc function

Closes: https://github.com/ebassi/graphene/issues/76

This commit makes the existing flat set of macro tests into a big if-else
block, and selects only one aligned alloc function. If no such function is
available, meson now terminates with an error and the build will fail.

This is as recommended by @nirbheek, who suggests that meson should only
search for a single aligned memory allocation function during configuration
of graphene.

Ref: https://github.com/ebassi/graphene/pull/86#issuecomment-264900534

On MSYS2, a buggy mismatch between the native mingw-w64 builtins and the
standard headers causes meson < 0.37.0 to report that the function exists
because the underlying builtin exists. Cascading the tests like this works
around breaking configuration on the MSYS2 platform for meson<0.37 by
excluding certain POSIX-only cases on Windows.

Ref: https://github.com/mesonbuild/meson/issues/1083

ebassi/graphene,ebassi/graphene