onShown and onHidden callback functions added to uiModal based on the firing 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.