Added an AfterClose event

Allows for extra programatic control over the way the popup behaves.
Merge pull request #105 from julen/feature/after_close_event

Added an AfterClose event