Tests: Replace resource loader with AMD

:boom: WIP...

Pulll request's goal is to AMDify tests for 1.12.0 release and address part of http://bugs.jqueryui.com/ticket/10119.


I fixed this and other style issues in be3b2b2d8b3c9647750be2e4bb4f9d4d7e6ec670, so you can pull in those changes.