Backport DB API changes functionality to set table name.

This would allow the use of the new syntax i.e.:

-$t_query = 'SELECT COUNT(*) AS unused_user_count FROM ' . $t_user_table . '
+$t_query = 'SELECT COUNT(*) AS unused_user_count FROM {user}

Whilst still allowing use of the old syntax, to give developers and plugin
authors the opportunity to start migrating code to the new syntax ready
for the 2.x.

By doing this, it also helps us extend the life of 1.3 - as it stands, if we
release test versions of mantis with the new DB layer about within a month of
the final 1.3 release as previously agreed, we could reach the stage where we
have support issues from our side for the 1.3 release.
This change is not acceptable as it will cause issues to upgrading instances.
The code should handle adding the trailing underscore.