Close tab on middle-click (fixes #106)

Also make sure we only fire regular commands when left-click is used, not for any buttons, otherwise the tab will be focused right before being closed. Plus it makes no sense to execute regular commands when not using left-click everywhere else.