refactor($ionicLoading): make sure .hide() always happens after .show()

Fixes #1085.  Thanks @graemefoster.