Introduce the SGet monad

as an abstraction about parsing from one file, recording named segments
on the way.
Major refacotring of parsing; monadic segments