registry: don't fail if targetState is unavailable
Merge pull request #784 from jonboulle/fix

registry: don't fail if targetState is unavailable
schema: add IsGlobal and associated tests
schema/job: move IsGlobal to job.Unit
job: fix comments and add missing test