Implemented bs_flush_stream method.
Split stream functions out into bs_stream.c
Revert "Restructued codes"

This reverts commit a422512c813a165725d7f598868a333a5af2eead.

Conflicts:

	Makefile.am
	src/bs_base64.c

I think this previous refactoring was a little pointless, and there's no reason
not to separate functionality into small files.

This commit splits out bs_hex.c and bs_base64.c from bs_string.c, and restores
bs.c to contain bs_load() and bs_save().
Changed stream function names

Changed bs_(.*)_stream to bs_stream_\1 in all locations. Also took the
opportunity to reorder the include file to match the order of source files.
Substantial modifications to protect against NULL pointers

We're dereferencing pointers all over the place without checking whether they
might be NULL before doing so.

This commit creates a new exit type (BS_NULL), and a macro (BS_CHECK_POINTER)
which returns it if the pointer being checked is NULL. In addition, all library
functions (except stream stuff which will follow) have been hardened to protect
against NULL pointers, and test cases created to confirm this. Functions not
returning a BSresult have an assertion instead.

Fixes gh-1