connection: Redo ANSI parsing so non-'m' codes are correctly ignored