Includes $query in SkinTemplate::tabAction() if $title doesn't exist

Required by https://www.mediawiki.org/wiki/Extension:NamespaceRelations

* added PHPDoc for SkinTemplate::tabAction()

Change-Id: Ia9d3838d2adf3b8afbd5b142bb7a1ea3e1c31371