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.
Have a look at db_get_table() for handling of trailing/leading underscore in pre/suffix.

To avoid code duplication, maybe 2 short functions db_get_table_prefix() and db_get_table_suffix() should be created.