Some minor cleanups for syncthing

For read access to Discover.registry we only need to take a read lock.
Just kill this line while you're anyway tidying...