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.