monitor: Introduce ReadLineState (Jan Kiszka)