Properly removes listener for $locationChangeSuccess when dialog is clos...

Properly removes listener for $locationChangeSuccess when dialog is closed.  This prevents unnecessary dialog close events being triggered every time a location change happens when the dialog is already closed.

Fixes #376 and compliments PR#383 and PR#381 and PR#436