Adding check to _endBackgroundTask to verify the application exists before calling GWS_DNOT_REACHED.

This enables what is admittedly a rare scenario which is running these servers inside application-less unit tests where there is no UIApplication.
Merge pull request #105 from nickgravelyn/fix-crash-in-ios-unit-test

Prevent GWS_DNOT_REACHED when there is no application