Test: Convert from using glib to using cmocka.
The benefit of this is that we'll be able to mock up objects in the
future, which should allow for unit testing functions that would
otherwise be difficult to test.
This is a big patch, but the changes are simple:
- Add a block of includes at the top of each file.
- Add -lcmocka to every Makefile.am.
- Change the unit test function headers.
- Convert to the new assertion macros, which for the most part are very easy changes.
- Convert all the main functions, most notably getting rid of the test case namespacing thing.