Created a helper function to allocate memory when exporting data.

Added bs_malloc_output() to src/bs_alloc.h and src/bs_alloc.c.
Added unit test (with three testcases) to tests/bs_alloc.c.
Fixed coverage target in makefile which builds .gcov output.
Reordered and commented functions in src/bs_alloc.c

These are now grouped depending on whether they're exposed externally
or internally.
Modified bs_save_binary to use the new bs_malloc_output helper.

Changed implementation of bs_save_binary in src/bs_string.c to use
the new helper function rather than allocate memory itself.
Added bs_save_string method and unit test.