Make masonry compatible with component framework

Export Masonry constructor if module.exports is defined
Define masonry.js as component source (add it to "scripts" declaration
in component.json)