Add ability to update the image for an attachment

Currently there is no way in the API to update the image for an attachment. You just upload the initial image and then edit the post data. There are circumstances where updating the image data associated with the post is needed.

If you upload a file to the /media/:id endpoint (like you would to /media) then the image for the attachment is replaced. Otherwise the previous behavior of updating the attachment post occurs.

I'm open to suggestions on a better approach.