Parser overhaul

1) Only does one line at a time now in the parser - fixes bugs with
swallowed lines
2) Better length calculation - faster for JSONFrame and generally
improved
3) Whilst I'm here, fix a bug with rdns' callback.