API.Posts: Posts can now only be edited by authors.

Add a check that post.user_id == current_user.id.
API.Utils: Pythonic fix to if statement.
Added js to handle not authorized condition
It's not the best because it uses AJAX,
so part of the page will load before the user receives
the 'not authorized' message, but it works.
They still can't edit it anyway
Fixed a few errors in the api and the js
*A little more consistency: some post functions now
consistently use success and the errors array (not all)
*In the js added more error handling for cases where the post
does not exist, or the user is not authorized, or any other gener
failure
PEP8 fix
Merge branch 'master' into nicer-post-css

Conflicts:
	calpoly/static/js/pages/posts_edit.js

My attempt at fixing a merge conflict.