Cleanup in the action handler

On the iPhone idiom the UIPopoverPresentationControllerDelegate methods
are never called. So there is a memory leak and also we never decrement
the activeAlertController count. This fixes it by calling cleanup in
the action handler
Merge pull request #6472 from vishalduggal/optionDIalogFix

Cleanup in the action handler