Move upserting of content items into the model.

This removes a lot of this logic from the controller, which wasn't the
right place for it really.
Gracefully handle unexpected fields in the input.

Currently extra fields in the intput cause a 500 error.  This changes
this so that they now return a 422.