I have had those exact same problems with my D3 and D3S. The first of the problems was inadvertently changing from RAW to JPEG. I happened to see the settings had changed while making another adjustment and managed to salvage what I had. I have large hands and figured that while holding the camera to make an ISO adjustment I somehow had unintentionally put my finger or thumb on an additional button as I made the desired change. It happened enough that my solution was to cover and tape the buttons on the camera back so they couldn't accidentally be pushed. That solved the problem with the D3 and I did learn to review all the settings whenever I made an adjustment to make sure they were what I wanted.
I had used the D3S for a while, without taping the buttons, and hadn't had any of the problems until I noticed half stop variances in exposure and finally figured I had activated the bracket feature. I had to read the book to see how to turn it off. I did manage to change from RAW to TIFF once in March of this year without a clue how I did it. I do know the change happened when I was making several adjustments at once because of environment, subject movement and lighting changes during an event. I saw the quality change when I was undoing the other changes.
Bottom line I still don't know how I made the changes I didn't want but I continue to review all the settings whenever I make an adjustment. I've had my D4 since March and D800 since June haven't had those problems with them. I know taping off the buttons on the D3 was extreme but it did solve the problem and everything the back buttons do is in the menu.