store: fix race in watcher_hub

Get the lock before modifing the global objects in the hub.
Merge pull request #1872 from xiang90/fix_watcher_race

store: fix race in watcher_hub