Post input validation and clean up

Added input validation to the post create and post delete client side
code. Also cleaned up unnecessary code from the posts resource and the
profile controller.