convert table exists checks to help install on postgres

TODO: must fix lang string usage in plugins to use correct Moodle plugin types instead of dodgy method in lang/en/block_ilp.php