Use on 'finish' for examples and tests

Starting in Node v0.10.0, readable streams do not emit 'end' unless
read() has been called. Updates examples and tests to rely on 'finish'
coming immediately instead.
Run tests in Travis CI against Node 0.10