Make mate-terminal --tab open a tab when applicable

Hi,

The patch is adapted from one that was originally submitted to the GNOME buzilla.

 * [Bug 83203 - Command-line option to make factory open a tab in last-used existing window](https://bugzilla.gnome.org/show_bug.cgi?id=83203)
 * [attachment 209421 from comment 65 of the above bug](https://bug83203.bugzilla-attachments.gnome.org/attachment.cgi?id=209421) (the original `gnome-terminal` patch)

This patch applies cleanly to `mate-terminal` 1.7.90 and `:master`, builds correctly, implements the intended behaviour and fixes #45. Go on, merge it and fix a 12 year old bug ;-)