Fixed: CPPopover not closing in some browsers

In browsers without support for _DOMElement.removeEventListener CPPopover
throws an exception when closing, and the popover is not removed. This fix
checks for support implicitly using the _browserAnimates variable.
Formatting: Fixed formatting in _CPPopoverWindow

Refs #2137
Merge pull request #2137 from Asriwi/fix-popover-close-exception

Fixed: CPPopover not closing in some browsers