Fix Validation_Exceptions is Media and Posts api
Save current user id as owner when creating a new post

Summary:
Save current user id as owner when creating a new post

Address T147

Additionally catching state errors from JSO when trying to use implicit flow

Hide email and name fields on post create form if user is logged in.

Additional tests for assigning posts to current user

Refactor post user saving

* Move into its own function
* Allow admins to edit post user details
* Throw errors if someone tries to modify user details w/o permission

Refactor oauth state exception checking

Use _.contains instead of multiple comparisons

Fix bugs in post user refactor

Refactor API code to unpack related IDs

Most calls to is_numeric were actually just checking a value was not
an array

Replace throw ORM_Validation_Exception in API with Validation_Exception

User console.warn instead of console.log to report oauth state error

Move jso state exceptions to a var

Move jso–state-exceptions to internal module variable

Fix Validation_Exceptions is Media and Posts api

Fix 500 error in posts api - calling loaded instead of loaded()

Test Plan:
- Create a new user
- Log in
- Create a post
- Check that you can view the post
- Check the post is owned by the current user (user_id in db matche current users id)

Reviewers: shadowhand

Maniphest Tasks: T147

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