Make Encoding class thread-safe

Now all const methods may be called without additional locking.
This is assumed by the threaded LaTeX export, which always useses a globally
unique instance for each encoding.