Extraction of ("protected") event handlers

TVPJSFRMWK-1683 / HTMLCRB-1483

In order to allow subclasses to override behaviour of the keyboard to disable number insertion on number-key press the key handler logic needed to be moved outside of the init closure. This required moving the associated (private) functions out of that closure. The select handler logic was also moved out of the closure for consistency.

No functional changes.