Refactored PhoneGap plugin to be Plugman compatible

Refactored this plugin to be Plugman compatible, for easier installation. Not all steps are automated yet, but this should be a lot cleaner than the old version.