Processes:  This fixes the mis-placment of the loading animation.

The loading animation was mis-placed when the cache is empty
and the gif was not pre-loaded.

This uses the imagesloaded js library, adding it into PPA.
imagesloaded is distributed under the MIT license.

I have included both the stripped and commented versions
of imagesloaded in the PPA tree.  Only the stripped version
is sent to the browser.

Note that since this fixes a bug it might be well to rebase
it back to where the bug came in.
js/database.js: Abstract out repeated jQuery calls.
js/database.js: Follow js captialization conventions.

This should probably be rebased back into d423fa28 and e0a6d0af.