Make TemplatedWidget and SnakTypeSelector compatible with jQuery UI 1.9

In jQuery UI 1.9, $.widget does a lot of setup, so we need to call it.
We also need to overwrite widgetBaseClass afterwards.

Change-Id: I2acac0b9592fad10cdeb181394cd7761edec1d57