Parse OSC codes in escape_code_length(). 

They begin with *esc* ] and are terminated with ST (*esc backslash*) or *bel* (ASCII 7).

OSC codes are useful in prompts. For example, in xterm OSC 50 changes fonts and OSC 0, 1, and 2 are used for setting window and icon title (other terminals interpret this as window and tab title); FinalTerm uses it for its proprietary escape sequences, which enable some really cool features; iTerm2 uses it for its proprietary escape sequences (including [Shell Integration](http://www.iterm2.com/shell_integration.html|), which is what motivates me).