Synchronizing access to Note JSONObject instance

Protects from concurrency exceptions when reading and modifying the JSON values.

see #1982