Fix newline character in paste()

Resolves #19
Implement middle-click tab-closing

This is done by installing an event filter to the tab bar, instead of
subclassing.

Fixes #18