Switch to using build-type Configure instead of Custom.

Doing so allows for easier building on the HaLVM, as it doesn't require Cabal to
be smart about cross-compilers. The new configure script is a straightforward
reimplementation of the old Setup.hs semantics into autoconf form. Both the
configure.ac and configure form are included for simplicity.