Threadsafe API: Made the string return buffer thread-local
Threadsafe API: Add a mutex and appropriate locks to ensure only one
thread at a time can call into the DLLEXPORT functions.

Some shortcuts were taken where it was clear that the lock was not
needed or could be placed more conveniently.

It would be nicer to make all the classes threadsafe instead, but this
approach is attractive because it's easy to see that it's deadlock-free
and safe.
Added functions for reading and writing hexadecimal strings
Updated copyright year
Set next extension version number