add tom/replace-smart-quotes written for superuser.com answer
smart version of join lines that handles continuations and comments