Add dependency on imagesloaded.js. Use it in .pat-modal

If images are loaded via pat-inject inside a modal, the modal is resized before
the images are loaded resulting in a wrong size and position.

We use imagesloaded to make sure that all images are first loaded.