It may just be the guitar.
I have had a total of 3 guitars out of about 50 in my lifetime that wouldn't stay in tune no matter what i did. I tried every trick in the book to keep them in tune....drove me freakin' crazy...
and guess what?....I sold all 3.
1.The first one was an 82 Fender Strat
2.The second one was a Jackson Randy Rhoad I (USA) with a Kahler tremelo (which was the problem in the first place)
3. and the 3rd one was a Hamer double cutaway (can't think of the model) with p90s (import)
You may just need to get another guitar