typelib compiler: properly initialise memory

The typelib compiler was writing uninitialised memory to the output file.

There were two sources of this uninitialised memory: the hash writer included
some uninitialised memory in its output, and the bytes added after the hash
output for padding were also not being initialised.

Fix this by passing the padded size to the hash code writer function and
having that function initialise the entire memory region to zero before
writing.

https://bugzilla.gnome.org/show_bug.cgi?id=721177
tests: Update Python stanza to change directories before running tests

Ensure PYTHONPATH uses absolute paths for top_builddir and top_srcdir. Use
pushd/popd before and after running tests with "python -m unittest...". This
ensures TESTARGS can be used from within a vpath build directory.

https://bugzilla.gnome.org/show_bug.cgi?id=720713
tests: Use Automake test harness for tests/offsets

Replace usage of check-local with the Automake test harness. Change check_
variable usage to EXTRA_ in order to avoid building these dependencies with
targeted testing using TESTS= in parent directories.

https://bugzilla.gnome.org/show_bug.cgi?id=720713
tests: Add tests for various struct typedef combinations

Add functional blackbox tests typedefs.[h|c] for various struct typedef
orderings. Use XFAIL_TESTS with the new Typedefs-1.0.gir target.
This allows for a differing expected gir that does not cause the suite
to fail but rather a goal to work towards.

https://bugzilla.gnome.org/show_bug.cgi?id=581525
scanner: Fix get_symbols/comments to maintain the scanner lists

Use g_slist_copy prior to returning the lists run through g_slist_reverse.
This preserves the source scanners internally held lists where previously
they would only point to a single element after a call, leaking memory and
breaking subsequent calls. Note the functions as (transfer container) and
use g_slist_free after calls in the Python bindings.
Add new unittest file: test_sourcescanner.py for isolated unittesting of the
SourceScanner.

https://bugzilla.gnome.org/show_bug.cgi?id=581525
tests: Add transformer typedef struct tests

Add tests for various combinations of struct tags and typedefs. This
includes tests for orderings of a typedef prior to struct definition,
reversed, all in one, and multiple typdefs. The currently failing tests have
been marked as "expectedFailure" so the test suite doesn't bail out.

https://bugzilla.gnome.org/show_bug.cgi?id=581525
tests: Add nested struct tests for transformer

Add tests for nested structs as they pass through the transformer.

https://bugzilla.gnome.org/show_bug.cgi?id=581525
tests: Add nested union unittests

Add a sub-set of tests found in struct testing as only basic validation is
needed due to the shared code paths.

https://bugzilla.gnome.org/show_bug.cgi?id=581525
tests: Add transformer tests for callback typedefs

Add a basic transformer unittest for callback typedefs.

https://bugzilla.gnome.org/show_bug.cgi?id=581525