Use certificate pinning on Staging Server

Only scheduleRefresh when GCM registered
Only unregister from GCM when GCM registered
Remove some checks to move from dev to deploy
Merge branch 'master' into feature-1000

Conflicts:
	AndroidManifest.xml
	assets/emoji_0_wrapped.png
	assets/emoji_1_wrapped.png
	assets/emoji_2_wrapped.png
	assets/emoji_3_wrapped.png
	assets/emoji_4_wrapped.png
	build.gradle
	res/drawable-hdpi/ic_smiles_backspace.png
	res/drawable-hdpi/ic_smiles_backspace_active.png
	res/drawable-hdpi/ic_smiles_bell.png
	res/drawable-hdpi/ic_smiles_bell_active.png
	res/drawable-hdpi/ic_smiles_car.png
	res/drawable-hdpi/ic_smiles_car_active.png
	res/drawable-hdpi/ic_smiles_flower.png
	res/drawable-hdpi/ic_smiles_flower_active.png
	res/drawable-hdpi/ic_smiles_grid.png
	res/drawable-hdpi/ic_smiles_grid_active.png
	res/drawable-hdpi/ic_smiles_recent.png
	res/drawable-hdpi/ic_smiles_recent_active.png
	res/drawable-hdpi/ic_smiles_smile.png
	res/drawable-hdpi/ic_smiles_smile_active.png
	res/drawable-hdpi/sms_selection_icon.png
	res/drawable-hdpi/sms_system_import_icon.png
	res/drawable-mdpi/ic_smiles_backspace.png
	res/drawable-mdpi/ic_smiles_backspace_active.png
	res/drawable-mdpi/ic_smiles_bell.png
	res/drawable-mdpi/ic_smiles_bell_active.png
	res/drawable-mdpi/ic_smiles_car.png
	res/drawable-mdpi/ic_smiles_car_active.png
	res/drawable-mdpi/ic_smiles_flower.png
	res/drawable-mdpi/ic_smiles_flower_active.png
	res/drawable-mdpi/ic_smiles_grid.png
	res/drawable-mdpi/ic_smiles_grid_active.png
	res/drawable-mdpi/ic_smiles_recent.png
	res/drawable-mdpi/ic_smiles_recent_active.png
	res/drawable-mdpi/ic_smiles_smile.png
	res/drawable-mdpi/ic_smiles_smile_active.png
	res/drawable-mdpi/sms_selection_icon.png
	res/drawable-mdpi/sms_system_import_icon.png
	res/drawable-xhdpi/ic_smiles_backspace.png
	res/drawable-xhdpi/ic_smiles_backspace_active.png
	res/drawable-xhdpi/ic_smiles_bell.png
	res/drawable-xhdpi/ic_smiles_bell_active.png
	res/drawable-xhdpi/ic_smiles_car.png
	res/drawable-xhdpi/ic_smiles_car_active.png
	res/drawable-xhdpi/ic_smiles_flower.png
	res/drawable-xhdpi/ic_smiles_flower_active.png
	res/drawable-xhdpi/ic_smiles_grid.png
	res/drawable-xhdpi/ic_smiles_grid_active.png
	res/drawable-xhdpi/ic_smiles_recent.png
	res/drawable-xhdpi/ic_smiles_recent_active.png
	res/drawable-xhdpi/ic_smiles_smile.png
	res/drawable-xhdpi/ic_smiles_smile_active.png
	res/drawable-xhdpi/sms_selection_icon.png
	res/drawable-xhdpi/sms_system_import_icon.png
	res/drawable-xxhdpi/ic_smiles_backspace.png
	res/drawable-xxhdpi/ic_smiles_backspace_active.png
	res/drawable-xxhdpi/ic_smiles_bell.png
	res/drawable-xxhdpi/ic_smiles_bell_active.png
	res/drawable-xxhdpi/ic_smiles_car.png
	res/drawable-xxhdpi/ic_smiles_car_active.png
	res/drawable-xxhdpi/ic_smiles_flower.png
	res/drawable-xxhdpi/ic_smiles_flower_active.png
	res/drawable-xxhdpi/ic_smiles_grid.png
	res/drawable-xxhdpi/ic_smiles_grid_active.png
	res/drawable-xxhdpi/ic_smiles_recent.png
	res/drawable-xxhdpi/ic_smiles_recent_active.png
	res/drawable-xxhdpi/ic_smiles_smile.png
	res/drawable-xxhdpi/ic_smiles_smile_active.png
	res/drawable-xxhdpi/sms_selection_icon.png
	res/drawable-xxhdpi/sms_system_import_icon.png
	res/values-bg/strings.xml
	res/values-de/strings.xml
	res/values-el/strings.xml
	res/values-es/strings.xml
	res/values-fr/strings.xml
	res/values-hu/strings.xml
	res/values-it/strings.xml
	res/values-kn-rIN/strings.xml
	res/values-nl/strings.xml
	res/values-no/strings.xml
	res/values-pl/strings.xml
	res/values-sl/strings.xml
	res/values-zh-rCN/strings.xml
	res/values/strings.xml
	src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java
	src/org/thoughtcrime/securesms/ConversationListFragment.java
	src/org/thoughtcrime/securesms/RegistrationActivity.java
	src/org/thoughtcrime/securesms/RoutingActivity.java
	src/org/thoughtcrime/securesms/gcm/GcmBroadcastReceiver.java
	src/org/thoughtcrime/securesms/service/GcmRegistrationService.java
	src/org/thoughtcrime/securesms/service/RegistrationService.java
	src/org/thoughtcrime/securesms/util/Emoji.java
	src/org/thoughtcrime/securesms/util/TextSecurePreferences.java
Don't register GCM when userRecoverable error

Check periodically if Play was installed or updated
Set DISABLE_GCM to false for testing
Re-factoring to move common functions into Util classes
bump version for F-Droid and use different server