Maintain selection when performing value routine

Fix for #130 by getting the current selection and restoring the selection after setting the new value. This method is somewhat of an improvement over #138 since the input's value can actually change by way of a formatter without losing the user's cursor position or selection.

The downside to this method is that it adds some *really* ugly workaround code for IE < 9.