Fix GCM event receive.
Refactor sample.
Minor fixes in GCMProvider.