webapp: internal overhaul
- now save the visible text and restore on reload
- more robust disconnection handling
- abort bulk transfers after having an error
- manage state and position polling