UI for rotating images

Because mobile phones have a bad tendency to upload rotated photos, often with any headers to indicate that they are sideways, this adds a UI for viewing and rotating photos.
As we discussed, this was added because this is functionality we want in the undecorated view function, but I want to share it across 2 views, while still being DRY, and it does both pre and post processing, so it can't just be a normal helper function