Made reading/writing ROOT files thread safe

Thread-safe changes specifically affecting reading/writing different ROOT files from different threads. These changes require the use of C++11.