Text input tweaks and memory handling

- added input state
- added key events
- more testing with allocations: input/output/state
- result routing
- global state is now context
- slider works with events
- beginnings of text input handling