Revamp the build system.

This achieves several goals:

 * Less reliance on scripts so we have better portability to Windows
   (though we still have a ways to go for proper Windows support).
   Luajit, luarocks, moonscript, and busted are all installed via CMake
   now.
 * Trying to make use of pkg-config to get the correct libraries.  The
   latest libuv is still broken in this regard, but we'll at least be in
   a position to use it.
 * Allow the use of Ninja or make.  The former runs faster in many
   environments, and automatically makes use of parallel builds.

This also allows for system installed dependencies--though not through
the Makefile just yet--and adds support for FreeBSD.

This also make us build libuv and luajit as static libraries only, since
we're only concerned about having static libraries for our bundled
dependencies.
Deal with the missing dependencies for libuv.

Since libuv.pc is broken at the moment, try to determine libuv's
dependencies ourselves.  This ports most of the checks from libuv into
our CMake build, and fixes the build on other unix platforms.
wip: incorporate running unit tests and doing so out-of-tree