clean up TermBuffer
add and correct failing tests
remove indexOf from util as we don't use it anymore.
merge
Merge branch 'TermBuffer2' of github.com:c3ks/terminal.js into TermBuffer2

Conflicts:
	test/term_writer.js