Show invitations on project dashboard

These changes address this ticket: http://manage.dimagi.com/default.asp?115952

This PR adds a list of pending domain invitations to the domain select page (http://0.0.0.0:8000/domain/select/) with accept buttons next to each one. It also moves some of the logic for getting a users projects from a template tag and into the appropriate django view. I also created a new couch view so that I could get all invitations for a given user.
So given that this is going to be one of the most frequently viewed pages on the site I'm not very comfortable with the performance impact this causes. Round trips to couch are notoriously painful and at an absolute minimum this should have `stale=settings.COUCH_STALE_QUERY`. I'd prefer we used the cached_view framework like we do for other things like domain lookup that get triggered on every page load (though this isn't as bad). Happy to work with you on setting that up - the gist of it is the equivalent of this: https://github.com/dimagi/commcare-hq/pull/3324/ but you'll want to do some testing/validation to make sure there aren't any workflows that get circumvented weirdly (e.g. saving of invitations outside of `document.save()`)