Resolves thread-safety issues surrounding keyPool

Uses ConcurrentHashMap instead of HashMap to prevent corruption of the keyPool when used by multiple threads concurrently.
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.