Fix #2357. Close progress dialog when ending activity

This corrects errors of leaking the dialog.
Merge branch 'windowLeak' of https://github.com/campbeb/c-geo-opensource into upstream