Application sharing and team workflow

This pull request fixes #226, fixes #370, fixes #369 and fixes #368.

Integration tests are included that cover the `git push` workflow for multiple users in a team.  We also have API-level tests for new endpoints.