Use multiple inheritance for generated dialog class

[FEATURE] Change the generated plugin to use multiple inheritance so that ui members can be referred to directly using self.<objectname> and autoconnect slots will work.

This PR also fixes a  bug in the upstream master that causes template replacement to fail in the template makefile.