Watch Cesar Milan on TV or read his books.
When you catch the dog doing the undesired behavior, squirt him with a water sprayer or grab him behind the neck and roll him onto his back (into a submissive position) and hold him there
Dogs love to please their owners so the first thing to do is let him know the behavior is unexceptable. Tell him no and remove him from the situation. When he's good reward with treats.
Training and some patience,when he start's to hump use Grumble voice and Stern No.The dog will understand you don't like it's behavior by the tone of your voice.
There is no real way to do that. My male animals always did it. Even if dogs are fixed they still have natural instincts, that need to be addressed. You could buy him stuffed animals to see if he would use them over the cats.