Updated jQuery UI Widget Factory and fixed AngularJS widget options handling. Closes #2904