Added additional methods to provide access to the underlying buffer

Stream processing works really well when we're reading a stream of bytes and
outputting it in some processed form, but doesn't help when processing data
going the other way - the bytestream is full of converted data that needs to be
written out to a string before it can be read back in.

The first method added, bs_get_buffer(), allows convenient access to the
underlying internal buffer.

If this buffer is set in to a new bytestream, then it's now impossible to free
(two streams will think they own it). bs_unset_buffer() has been added to allow
a buffer to be "unhooked" from a stream.
Added additional file to .gitignore
Extended stream functions to pass user data

To improve performance of stream functions, this commit extends them to pass
a pointer to some user data. This saves reinitialising e.g. a processing stream
at each call.
Added const qualifier to bytestream parameter of bs_get_buffer
Added cast to shut up compiler warning