Do ISO-6429(ECMA-48) compatible control function parsing

*What is changed*:

- Catch all ISO-6429(ECMA-48) compatible control function sequences, which start with CSI.
  with this change, iTerm2 come to skip unknown sequence correctly.
  For example, current iTerm2 cannot skip 'CSI Ps " q' (DECSCA).
  It causes "garbage output" problem.

- Solve confusion between some similar sequences.
  For example, current iTerm2 cannot distinguish "CSI > Ps ; Ps t" (xterm's title mode) from "CSI Pm t" (DECSLPP/dtterm's window manipulation).  

- Added test script for CSI sequence behavior.
  tests/iso6429csi.py

It seems to me that ISO-6429 compatibility is considered by Xterm and Terminal.app. so probably, this patch also improve Xterm/Terminal.app compatibility.

If a terminal application developer want to use experimental or uncommon sequences(such as DECSCA), "garbage output" problem on some terminals (gnome-terminal, konsole, Linux Console) will prevent him, and he may give up it finally.
It may have some risk because this patch changes parser behavior.
But I want to improve such circumstances, so I want to push this change into master, if possible.

Reference:
ECMA-48: http://www.ecma-international.org/publications/standards/Ecma-048.htm