Add synchronized keyword to Storage methods

Resolves some potential concurrency bugs especially with LocalStorage
writing of document concurrently.