Refactor work with push providers.
Add provider registration process.
Refactor GCM provider. Add Amazon Device Messaging support.
Fix bugs in event and register process.
Fix bugs with events. Update sample.
Fix merge error.