Make Schema Fetching thread safe.

>This uses a mutex to allow for safe updating of the schema by one and only one bot thread or process. Other bot threads have to wait until its updated before reading.

I also cleaned up the Schema class a little bit and added some comments.

This should resolve #262. At least according to my testing, which involved deleting the cache file, and running multiple bots (as both threads and processes).