The concern of getting heckled is overblown. A heckle first off is not always a heckle. Sometimes somebody talking during your set is simply agreeing with you or telling somebody nearby that they agree or have been through whatever the experience the comic is talking about.
To succeed with a heckler you first have to not take yourself so seriously. You are a comic, be funny about your exchange with anybody in the audience for whatever reason. Treat somebody talking to you as if it's a friend who has interrupted you momentarily. Listen and see if you can resolve the situation quickly and humorously.
The most important thing to do is move on! Keep your set moving forward. Ignoring is a powerful anti-heckler tool. If this is not possible then acknowledge the statement with as quick a retort as possible but keep it fun. Allow the heckler to be the one to draw the ire of the crowd not you. Make sure he/she talks to the point of getting the crowd against them. Don't come down too hard too quickly. Always allow a heckler to hang himself/herself before engaging with put down comments. Gain the crowd's backing and then go for it.
If you constantly get heckled at a certain point in your act perhaps you could look at the material you're doing and see if there is a way it could be rewritten so as not to give a heckler the opportunity to fire off, perhaps it's a misunderstanding of what you're saying etc. It would be to your best interest to do this.
Now of course if the heckler is too drunk then it would be good to point this out playfully to the club management or security guys. You won't win with a drunk heckler, even after getting the better of the exchanges the crowd will begin to sense that you're the only one armed in the verbal jousts and start to feel bad for your intoxicated foe. It's always ok to ask the venue staff to please have a chat with your newest drunken comedy partner. ;)
Should you have practiced comebacks for hecklers? I'm not so sure, I've always been an advocate of staying in the moment and just talking my way through it. A few memorized funnies might not be a bad idea though. Go for it.
But whatever you do, never let a heckler win. Keep control of your show and your audience in the nicest way possible. Keep a smile on your face even if you are forced to say F-off! Never let them see that they rattled you in any way. You have paid the price to have the spotlight, own it at all times.