Add documentation.

See doc/key-sequence.txt
Find a way to distinguish type-in and modifier

View key sequence(series of key presses and releases) as
points and line segments.

A key press/release pair forms a line segment where
begin and end point is represented by press/release respectivly.

If line A contains line B, then key A modifies key B:
    abBA -> a(b)
    a__a
     bb

If not, then it's type-in:
    abAB -> ab    aAbB -> ab
    a_a           aa
     b_b            bb
Implement key sequence parse

See sub/key-seq-permutation/*.txt for some examples
Add comments and remove debug code