Some minor cleanups for syncthing

For read access to Discover.registry we only need to take a read lock.