QueryBuilder - replace deprecated getAlias() by getAliases()[0]

this does not work on PHP 5.3

and this should take care of checking that it exists too (which is done by ``getRootAlias``)