Having read all this, I realize you're in the process of moving out (for the better), but I think your behavior needs to be looked at as well ( for your next relationship),
On one hand you say you don't snoop, find it embarrassing, etc, but then talk about always checking the browsing history - how is that not "snooping?"
Next you make a fuss about him masturbating, but you go ahead and do it yourself?
My take is that he's depressed, maybe work is getting stressful..coming home to someone accusatory, checking browser history regularly, getting upset and making a fuss over porn (he's probably just embarrassed by it), wouldn't help.
I think counseling should of entered the picture long ago, and if things do turn around between you two, it needs to be a requirement.