jquery.textSelection: Add ability to register custom implementation

At times we replace the textarea with a different implementation, for
instance in the former iframe code of WikiEditor and now in CodeEditor.

Obviously only one implementation of this API can be in control at a
time, but in order to disable/enable which one exactly is currently
determined by the existence of function in the core WikiEditor
context. This is a remnant of when this code was still in WikiEditor.

I added two commands, "register" and "unregister", that take an object
that has alternative function implementations for one or more commands.

Bug: 29328
Change-Id: I14492572f7eb9bbd1af68872dbfef5159126f107