pkg/registry now passed race detector.
use mutex instead of rwmutex
Merge pull request #306 from monnand/registry-race

Solved data races in pkg/registry