Remove duplicate code by using plpydbapi in plpython code

Take plpy specific code out of republish_module and create republish_module_trigger for the postgres trigger.