[bug]preserve encoding should not remove nonbreak spaces, [feature] allow encoding type to be set

Non breaking spaces (&nbsp;) were gettign converted to regular spaces when preserve encoding was set to true.  This prevents them from getting converted to spaces and preserves them as non breaking spaces as browsers treat the two differently.  Nonbreaking spaces have been widely used as a crutch in our user base to get rendering correct in some email clients.

The other piece of this pull request is to allow the ability to set the original encoding and the output encoding instead of the hardcoded values previously in the code.