Library is now thread safe.

Both the decoder cache and the encoder cache have been separated out from
the convenience abstractions, and now generate decoders in a thread-safe
manner. Furthermore, they now provide convenience methods to determine
which encoders and decoders have been loaded.