registry: use custom model for UnitState

Fix #665
Merge pull request #670 from bcwaldon/665

registry: use custom model for UnitState