Test fix: this solves waiting problem in an elegant way.

1. The keys after launching vim will wait until the vim is full loaded.
2. The keys after leaving vim will wait until the vim process is dead.
3. A bunch of cleanups.
My tmux is version 1.8 and it works well.
I just forgot to change it to 1.8.