GApplications: Tighten up application-id validity checks
GApplications: Tighten up application-id validity checks

Also add tests for these conditions.
https://bugzilla.gnome.org/show_bug.cgi?id=643197

darren-clark/android_platform_external_bluetooth_glib,darren-clark/android_platform_external_bluetooth_glib,justinkb/aosp-bluez.glib,johne53/MB3Glib,01org/android-bluez-glib,justinkb/aosp-bluez.glib,lukasz-skalski/glib,Distrotech/glib,djdeath/glib,tchakabam/glib,tamaskenez/glib,johne53/MB3Glib,cosimoc/glib,cention-sany/glib,gale320/glib,cention-sany/glib,johne53/MB3Glib,tchakabam/glib,darren-clark/android_platform_external_bluetooth_glib,iConsole/Console-OS_external_bluetooth_glib,pstglia/external-bluetooth-glib,endlessm/glib,endlessm/glib,ieei/glib,iConsole/Console-OS_external_bluetooth_glib,tamaskenez/glib,ieei/glib,tamaskenez/glib,krichter722/glib,justinkb/aosp-bluez.glib,bluez-android/glib,MathieuDuponchelle/glib,mzabaluev/glib,antono/glib,cosimoc/glib,cosimoc/glib,johne53/MB3Glib,bluez-android/glib,cosimoc/glib,gale320/glib,tamaskenez/glib,lukasz-skalski/glib,gale320/glib,gale320/glib,darren-clark/android_platform_external_bluetooth_glib,ieei/glib,pstglia/external-bluetooth-glib,cosimoc/glib,djdeath/glib,lukasz-skalski/glib,krichter722/glib,mzabaluev/glib,mzabaluev/glib,Distrotech/glib,zsx/glib,pstglia/external-bluetooth-glib,lukasz-skalski/glib,zsx/glib,krichter722/glib,ieei/glib,iConsole/Console-OS_external_bluetooth_glib,johne53/MB3Glib,Distrotech/glib,djdeath/glib,cention-sany/glib,endlessm/glib,01org/android-bluez-glib,endlessm/glib,zsx/glib,iConsole/Console-OS_external_bluetooth_glib,MathieuDuponchelle/glib,ahmedammar/platform_external_gst_glib,MathieuDuponchelle/glib,ieei/glib,antono/glib,mzabaluev/glib,MathieuDuponchelle/glib,cention-sany/glib,Distrotech/glib,pstglia/external-bluetooth-glib,ahmedammar/platform_external_gst_glib,iConsole/Console-OS_external_bluetooth_glib,ahmedammar/platform_external_gst_glib,endlessm/glib,zsx/glib,djdeath/glib,01org/android-bluez-glib,tchakabam/glib,antono/glib,antono/glib,MathieuDuponchelle/glib,darren-clark/android_platform_external_bluetooth_glib,pstglia/platform-external-bluetooth-glib,mzabaluev/glib,lukasz-skalski/glib,01org/android-bluez-glib,justinkb/aosp-bluez.glib,pstglia/platform-external-bluetooth-glib,tchakabam/glib,pstglia/platform-external-bluetooth-glib,tamaskenez/glib,johne53/MB3Glib,pstglia/external-bluetooth-glib,pstglia/platform-external-bluetooth-glib,djdeath/glib,bluez-android/glib,ahmedammar/platform_external_gst_glib,krichter722/glib,01org/android-bluez-glib,gale320/glib,tchakabam/glib,bluez-android/glib,Distrotech/glib,pstglia/platform-external-bluetooth-glib,bluez-android/glib,cention-sany/glib,justinkb/aosp-bluez.glib,krichter722/glib