Move demos/widgets.html inline script to a .js file

This way jshint runs on it properly.

Change-Id: I077732b740c86fd774525d84a7f3c96f54bb1428