Back on topic.
I'm not sure doing a soft or hard reset will solve the problem. I had a similar problem with my Windows Phone where taking a picture then posting to Facebook or Instagram the image would not be oriented properly.
The fix was Microsoft having to fix the Lumia Camera app.
The other thing is it may not be a problem with the phone at all, but the image reader/editing software on the receiving end not reading the files EXIF data properly.
This photo was taken in portrait with the home button down. The orientation data is the same as if it was held home button up in portrait.
Edit: And of course the orientation after uploading to iMore is 270 degrees off. So I'm not sure it's a problem with the camera app or phone.
This was taken after a soft reset and upside down (i.e. home button to the left. I emailed it to myself and it showed up in Outlook preview as upside down. However when I opened it in Photoshop to look at the EXIF data it was properly oriented (i.e. right side up).
Which after uploading here it sees it as I saw it in Outlook. All three photos I uploaded were oriented properly when opened with an actual photo editor/reader, however, they did not display properly in a browser window or in an email preview.
So I don't think it's an issue with the phone/camera app. If the there was a true orientation sensor issue or EXIF data being corrupted it would show up while displaying in Photoshop or any other dedicated image editor/reader.
Does that make sense?
P.P.S. I opened the images of my Surface mouse on my Android tablet. First using the Outlook image viewer and they displayed as the do here 90 degrees and 270 degrees off respectively. When I opened the images using the Gallery and Photo app viewers they both displayed with the proper orientation. Which again leads me to believe it is not a phone or camera app issue but an issue with the inline image display readers built in to MMS and email apps.
So to make a long story short. I don't think there is a problem with how you're holding the phone, the phone or the camera app. The problem lies in the inline image readers for MMS, email, and web browser apps.