Publish documents with resources
Merge pull request #5 from Connexions/publish-with-resources

Publish documents with resources
Adds application API key authentication and permissions.
Add trust relationship via api-key authnz.
Add a new 'Publishing' state to help prevent double publish.
Adjust to only check state at polling route to prevent race condition.