Move load event listener to a init() function

This change moves all the initialization code to a specific function
that can be loaded via emy.init() too. It brings  PhoneGap / Cordova
support