Updated API to adhere to accepted standards.

The `/posts/` path has been changed to `/posts`. It's a small change, but ends
up making the controller code simpler. This is the most used way to setup routes
anyway.

Changed PUT to act as POST if the object doesn't already exist in the database.