widget: Use the correct template in dispose_template()
In derivable classes, the widget's class can be different from the one dispose_template() was called for, which can lead to failing the template != NULL check at best, undefined behavior at worst.
Since we already pass the correct GType into the function, just use that instead.