Refactor posts update API

Summary:
- Scaffolding for refactor of posts update api
- Wiring checks for form, parent and locale validation
- Parse user, tags and values.
- Validate values.
- Update values, tags.
- Don't validate parent or type since those aren't changed after post create.
- Add FormAttributeRepository::getRequired()
- Add type and parent_id into post update data
- Tag create/update/delete tests
Lots of work-in-progress

Test Plan: `./bin/behat -c application/tests/behat.yml application/tests/features/api.posts.feature --tags update`

Reviewers: dkobia, eyedol, shadowhand

Reviewed By: shadowhand

Subscribers: rjmackay

Maniphest Tasks: T438

Differential Revision: https://phabricator.ushahidi.com/D270
Fix handling of parent id in posts repo and update use case

Summary:
- Split out `get()` and `getByIdAndParent()`
- Make sure parent id is included when loading sub posts (aka updates)

Test Plan:
`/bin/behat -c application/tests/behat.yml application/tests/features/api.posts.feature`
`/bin/behat -c application/tests/behat.yml application/tests/features/posts/api.updates.feature`

Reviewers: shadowhand

Reviewed By: shadowhand

Maniphest Tasks: T532

Differential Revision: https://phabricator.ushahidi.com/D328
Allow fetching post translation by locale

Summary:
- Fetch post by locale or id, depending on whats passed
- Separate params for finding the post from those for updating it

Test Plan:
`./bin/behat --config application/tests/behat.yml application/tests/features/api.posts.feature`
`./bin/behat --config application/tests/behat.yml application/tests/features/posts/api.updates.feature`
`./bin/behat --config application/tests/behat.yml application/tests/features/posts/api.translations.feature`

Reviewers: shadowhand

Reviewed By: shadowhand

Maniphest Tasks: T532

Differential Revision: https://phabricator.ushahidi.com/D332
Comment out revision creation test for now Refs T741
Fix author details in import task. Refs T532
Fix posts total_count with offsets > 0

Remove Ushahidi_Repository_Post->getSearchTotal() since method is
implemented in parent class.

Use public methods to null search query limit and offset.

Refs T438
switch from "pretty" to "dot" formatter for phpspec
Update marionette to v2

Summary:
- Update marionette in bower.json
- App initialize:after -> start
- view.close -> view.destroy and region.close -> region.empty
- Layout -> LayoutView
- regionType -> regionClass
- itemView -> childView
- Use emptyViewOptions for empty messages
- Update requirejs config

Test Plan: Work through the UI and look for broken stuff

Reviewers: shadowhand

Maniphest Tasks: T681

Differential Revision: https://phabricator.ushahidi.com/D339
Fixes to list behaviours in UI

Summary:
- Fix allowed_methods check on tags list (Refs T746)
- Remove select-post class used in user and tags lists
- Fix select all on tags and users lists
- Update posts list select html to match other lists (Refs T745)

Test Plan:
Go to each list (posts, users, tags)
Select and deselect items - check this works
Click select all - check this work

Reviewers: shadowhand

Reviewed By: shadowhand

Maniphest Tasks: T745, T746

Differential Revision: https://phabricator.ushahidi.com/D338
Restore Ushahidi_Repository_Post getSearchTotal(). Refs T532

Uses COUNT(DISTINCT posts.id) instead of just COUNT
This got lost in commit 9683a99c9a6c6f097e075b5bf2588ecadd43ba05.
Hide user login details from non-admins

Summary:
- Add global user object to App
- Check the user role before displaying login details

Refs T682

Depends on D335

Test Plan: Try viewing settings/users as admin and non-admin

Reviewers: bodacea, rjmackay, shadowhand

Reviewed By: shadowhand

Subscribers: shadowhand

Maniphest Tasks: T682

Differential Revision: https://phabricator.ushahidi.com/D336
Hide Manage Forms from non-admin users. Refs T683

Summary: Hide the Manage Forms menu item from non-admin users. This doesn't prevent non-admins from accessing /settings/forms though. If that's necessary as well, I could use some advice on the best way to accomplish it (redirect from the marionette controller?)

Test Plan: Follow test plan from T683 (make sure form_wizard feature is enabled in features.php)

Reviewers: shadowhand, rjmackay

Reviewed By: shadowhand

Maniphest Tasks: T683

Differential Revision: https://phabricator.ushahidi.com/D335

Conflicts:
	web/media/js/app/util/App.handlebars.js
Rebuild puppet manifests properly with modules and use bin/update

Summary:
- Rebuild puppet manifests properly with modules
- Add --no-dev and --no-git args to bin/update

Refs T296

Test Plan:
Run `bundle install` (to get librarian-puppet installed)
Run `librarian-puppet install`
Run `vagrant destroy` then `vagrant up && vagrant provision`

Reviewers: bodacea, rjmackay

Reviewed By: rjmackay

Subscribers: shadowhand

Maniphest Tasks: T467, T296

Differential Revision: https://phabricator.ushahidi.com/D253
Implement Endpoint within the media API, refs T696

Summary:
- add usecase.media.read and usecase.media.search
- integrate authorizer with all usecases
- endpoint and authorizer cleanup

Test Plan:
```
bin/phpspec run -f dot
bin/behat -f progress -c application/tests/behat.yml application/tests/features/api.acl.feature
bin/behat -f progress -c application/tests/behat.yml application/tests/features/api.media.feature
```

Reviewers: aMoniker, rjmackay

Reviewed By: rjmackay

Subscribers: srutto, bodacea

Maniphest Tasks: T696

Differential Revision: https://phabricator.ushahidi.com/D334
bad merge in D334, refs T696
Hide views menu on view change

Summary: Ref T772

Test Plan: open the menu, switch views

Reviewers: rjmackay, shadowhand

Reviewed By: rjmackay, shadowhand

Maniphest Tasks: T772

Differential Revision: https://phabricator.ushahidi.com/D351
hide media view under media_uploads feature

Summary: Ref T771

Test Plan: test the views menu with and without the media_uploads feature

Reviewers: shadowhand, rjmackay

Reviewed By: rjmackay

Maniphest Tasks: T771

Differential Revision: https://phabricator.ushahidi.com/D352
grunt growl notifications

Summary: Adds growl notifications for grunt

Test Plan: try running grunt build:css and build:js - if growl is installed you should get a popup notification when they're finished

Reviewers: shadowhand, rjmackay

Reviewed By: rjmackay

Subscribers: seth

Differential Revision: https://phabricator.ushahidi.com/D360
Enable searching for posts by id from Keyword search, refs T731

Test Plan:
Search for "99", "95", or "1" from Keyword.
Search for "test" from Keyword.

Reviewers: aMoniker, rjmackay

Reviewed By: rjmackay

Subscribers: bodacea, srutto

Maniphest Tasks: T731

Differential Revision: https://phabricator.ushahidi.com/D348
potentially moving matching postid to top of results, refs T731