update composer.json with project info, refs T539
Move A1, A2, and ACL modules into composer, refs T539

Summary:
- remove submodules, define composer packages
- require password-compat via composer
- update modules config

Test Plan:
```
bin/update
bin/behat -f progress -c application/tests/behat.yml
```

Reviewers: eyedol, rjmackay

Reviewed By: rjmackay

Subscribers: srutto, bodacea, dkobia

Maniphest Tasks: T539

Differential Revision: https://phabricator.ushahidi.com/D266
Replace Imagefly module with composer, refs T539

Summary:
- updated to latest version of Imagefly
- modified and sent PR for `source_dir` addition: https://github.com/Bodom78/kohana-imagefly/pull/12
- updated module reference and config

Test Plan:
```
git submodule sync
```

Manually verify that output of API call to `/media` works as expected using the API explorer.

Reviewers: eyedol, rjmackay

Reviewed By: rjmackay

Subscribers: srutto, bodacea, dkobia

Maniphest Tasks: T539

Differential Revision: https://phabricator.ushahidi.com/D265
Put composer.lock under revision control, refs T539

Summary:
Adding `composer.lock` to the repository makes `composer install` much faster.

Using `composer update` should only be used to update the locked versions or after changing `composer.json`.

Test Plan:
Check out a fresh version of and run

```
arc patch --nobranch D268
bin/update deploy
```

Reviewers: rjmackay, bodacea

Subscribers: spaudanjo, srutto, eyedol, dkobia

Maniphest Tasks: T539

Differential Revision: https://phabricator.ushahidi.com/D268
Update composer.lock after removing submodules, refs T539
Replace twilio submodule with composer install, refs T539

Test Plan:
```
git submodule sync
composer update
```

???

Reviewers: dkobia, eyedol, shadowhand

Reviewed By: shadowhand

Subscribers: srutto

Maniphest Tasks: T539

Differential Revision: https://phabricator.ushahidi.com/D262
Update composer.lock after twilio moved to composer. refs T539
Remove submodule update from .travis.yml. refs T539
Implement Authorizer for tag visibility

Summary: Implement the authorizer to handle tag visiblity

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

Reviewers: rjmackay

Reviewed By: rjmackay

Subscribers: brianherbert, srutto, shadowhand

Maniphest Tasks: T182

Differential Revision: https://phabricator.ushahidi.com/D274
Replace kohana/database with ohanzee equivalent, refs T611

Summary:
- replaces `kohana/database` with `ohanzee/database`
- custom db config class merged into Ohanzee
- update composer.lock

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

or any other test that uses config or db.

Reviewers: dkobia, rjmackay

Reviewed By: rjmackay

Subscribers: eyedol, bodacea, srutto

Maniphest Tasks: T611

Differential Revision: https://phabricator.ushahidi.com/D281
Add exception for individual tag authorization
Fix broken archive feature

Summary: - Remove replies attribute when change the archive status of a message

Test Plan:
 - go to #messages/list/all
 - click on `Archive` to archive a message
 - See an alert show `Message has been archived` and message moved to the archived list

Reviewers: shadowhand, rjmackay

Reviewed By: shadowhand, rjmackay

Subscribers: shadowhand, srutto, lkamau

Maniphest Tasks: T452

Differential Revision: https://phabricator.ushahidi.com/D277
Fix broken archive feature

Summary: - Remove replies attribute when change the archive status of a message

Test Plan:
 - go to #messages/list/all
 - click on `Archive` to archive a message
 - See an alert show `Message has been archived` and message moved to the archived list

Reviewers: shadowhand, rjmackay

Reviewed By: shadowhand, rjmackay

Subscribers: shadowhand, srutto, lkamau

Maniphest Tasks: T452

Differential Revision: https://phabricator.ushahidi.com/D277
Refactor posts api GET post and GET collection to new architecture

Summary:
- Post tests: Check for other fields on post response
- Post tests: Tag api.posts.feature with get/search so its easier to run relevant tests
- Refactor PostRepository to be more inline with TagRepo approach
- Add PostRepository, PostSearchData, Post search parser, and post formatter
- Handle user_id in API Formatter
- Refactor posts/ collection api to use new archtecture.
- Refactor posts/:id api endpoint to use new archtecture

Test Plan:
`./bin/behat -c application/tests/behat.yml application/tests/features/api.posts.feature`
OR
Just collection tests: `./bin/behat -c application/tests/behat.yml application/tests/features/api.posts.feature --tags=search`
Just individual post tests: `./bin/behat -c application/tests/behat.yml application/tests/features/api.posts.feature --tags=get`

Also ACL tests are failing
`./bin/behat -c application/tests/behat.yml application/tests/features/api.acl.feature`

Reviewers: eyedol, dkobia, shadowhand

Reviewed By: shadowhand

Maniphest Tasks: T438

Differential Revision: https://phabricator.ushahidi.com/D216
Add Post Authorizer implemented WITHOUT A2/ACL

Summary:
- Fix posts count to only include accessible posts
- Add Post Authorizer implemented WITHOUT A2/ACL

Depends on D216

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/api.acl.feature`

Reviewers: eyedol, lkamau, shadowhand

Reviewed By: shadowhand

Maniphest Tasks: T494

Differential Revision: https://phabricator.ushahidi.com/D279
Run PHPCS to check PSR2 on PHP files (but exclude kohana files)

Summary:
Since we're enforcing PSR2 on the new code in src/ lets use arclint to make life easier

Run PHPCS to check PSR2 on PHP files (but exclude kohana files)

Test Plan:
- Edit src/Init.php and run `arc lint`, get errors
- Edit some php in application and run `arc lint`, see nothing checked

Reviewers: eyedol, shadowhand

Reviewed By: shadowhand

Differential Revision: https://phabricator.ushahidi.com/D285
Translation API fixes

Summary:
- Fix limiting translations from api by parent id
- Handle string locale param to get a translation

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.translations.feature`

Reviewers: eyedol, shadowhand

Reviewed By: shadowhand

Maniphest Tasks: T438

Differential Revision: https://phabricator.ushahidi.com/D278
Allow custom formatting post values based on type

Summary:
Allow custom formatting on post values based on type.
For example allow post point data to be formatted as `{lat: 1, lon: 2}`
rather than in WKT.

This was possible before but broken we refactoring in D216

Test Plan: `./bin/behat -c application/tests/behat.yml application/tests/features/posts/api.geojson.feature` tests most of this - but still breaks because the `bbox` is missing from the response after refactor.

Reviewers: shadowhand

Reviewed By: shadowhand

Projects: #ushahidi_platform

Maniphest Tasks: T438

Differential Revision: https://phabricator.ushahidi.com/D260
Quick fixes to make geojson tests pass after posts refactoring

- Ignore the missing bbox in json
- Inject bbox into query string based on tile params

Ref T438 and T564
Validate data sources config params, fixes T326

Summary:
 - Add validation rules for smssync secret field
 - Support executing closures on the rules field
 - Support validators in the form scheme
 - Call `form.validate()` to validate form fields

Test Plan:
 - Go to messages/settings
 - Click configure on SMSSync data provder
 - Submit empty value for the secret
 - See required error message displayed around the secret field
 - Submit a value for the secret key and see pass

Reviewers: rjmackay, shadowhand

Reviewed By: shadowhand

Subscribers: srutto, lkamau

Maniphest Tasks: T326

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