Adding exception handling for nativeSelect and nativeSelection

New versions of Chrome and firefox no longer support selectionStart, selectionEnd and setSelectionRange. These changes simply wrap those functions in try ... catch and return 0 when not available. There might be better solutions.

Mozilla Bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=942730#c6

Chrome Bug:
https://code.google.com/p/chromium/issues/detail?id=324360