Draft but working architectural changes.

- implement new path for show input window
- implement new path for hide input window
- Reimplement IFM.getHeight and IFM.hasActiveKeyboard
- Finish preload and extract common code for generating InputWindows