Push current plugin in plugin_needs_upgrade()

Without this, the plugins' schema() methods will return incorrect table
names (i.e. without the plugin's name as a prefix) if they rely on
plugin_table() to build them.

This is really picking nits, because an incorrect table name is very
unlikely to cause issues since the function only checks the number of
entries in the plugin's schema array.
Make sure db prefix / suffix is consistently applied

Modifies the db_get_table() and plugin_table() functions to ensure that
we build a correct table name based on the user's config settings, e.g.

- trim leading/trailing whitespace
- do not add underscores if already present

Fixes #17355, regression issue introduced by commit
5a84e9db76162e378b9a1b0dea129d1f7ce127e9 where plugin_table() no longer
inserts an underscore after $g_db_table_plugin_prefix