registry: be safer about etcdError type assertions
Merge pull request #553 from jonboulle/553

fix panic during type assertion in storeOrGetUnit