Support for returning modal results

Allow passing an arbitrary parameter to modal.hide() method which is
accessible as event object property in 'hide' and 'hidden' events