uiModal onShown and onHidden function callbacks, updated testing of modal closing

...ring of shown and hidden events by bootstrap-modal.js

wire up by adding attribute value to ui-modal
e.g. ui-modal='{onShown:shownFn,onHidden:hiddenFn}'

updated ui-modal spec to make sure that the close tests take place after the modal has been opened first, otherwise they only confirm that the ui-modal hasn't been opened.