Load external jQuery libraries before JS widgets. Refs #2167

jquery.masonry.min.js is an external library and has been removed from
this repository.
Shutdown UI module minor fixes. Refs #2167