Make Format class almost thread-safe

This is needed since all formats are stored in a global list which is shared
between threads, but never modfified except from the main thread.
The only missing bit is extension_list_, which is not so easy to do.
Merge remote-tracking branch 'github/build-bot-master' into bleeding-edge-master
2014.12.21-21.00