Select the language based on pre-existing text (enhancement)

(Issue #97) Not completely ready.
It adds a 'range' of hex code points to every language listed in inputmethods.js.
Issue: on chrome, works only when the cursor is in text field and you change the tab, and return back to the same tab... strange. On IE, works well.

Tested with hindi, gujarati and punjabi.

Todo:
* Add all the matched languages to selector menu.
* Update the code point ranges for all the languages.
* Use more characters from the text (currently only one character just before the cursor is used).