*Note, ive had problems like this and gone as far as reaseating the processor/heatsink which fixed it, but then again i also removed all the ram sticks while doing this.
Could be either of those things. Certainly in your latest round of testing it sounds like it was the seating/connection of the RAM sticks. When you reseated the CPU, did you check for bent pins in the socket? If the problem keeps up that would be the next thing to check. See bilbat's sticky
, and search for "i3/i5/i7 'Missing' Memory".