Multithreading support.

cg_mutex is used for thread lock, unlock and trylock.
cg_once is used to run the given function once and only once.
cg_errno is used as errno and always is thread local storage.
trit, int, bytes and unicode types shall now be thread-safe.