Fixes https://github.com/sujeetgholap/typesmart.js/issues/4.
"If I type something in, select all of it (highlight it), and then the
first characte I type is either " or ', it doesn't get switched to the
correct version."
- Cursor.getText was being used in a wrong way.
- Deleting the selection wasn't being taken care of properly.