Resolves thread-safety issues surrounding keyPool

Uses ConcurrentHashMap instead of HashMap
Double-checked locking of keyPool when size has exceeded max size and is
being replaced. Without this, in the event of multiple threads
performing puts to the JSONObject with a high key miss rate, many new
keyPool maps will be allocated in rapid succession.