Return 404 if app cannot be found during queryset lookup

This fixes #182, where 500s were being thrown if the app was deleted.  This can happen if a formation is deleted (which deletes contained apps).  Git repositories may still be associated with the orphaned application.