fix(modal): allow modal.{dismiss,close} to be called again

$modalStack.openWindows.get(modalInstance) is undefined after the first dismiss and throws:
-   TypeError: Cannot read property 'value' of undefined

Closes #1972