Fixed PopupPresenter setCloseHandler

Fix for issue #497 

The popup.hide() calls throws a CloseEvent, which is not what we want. This is a bit hacky but @jDramaix added the popup.show() and popup.hide() calls, which are probably required for #302. It doesn't seems like there's a way to properly hide the popup without calling the hide() method except by using the JSNI hack. Thoughts?
I think the bit shift is too complex / 2 would be more readable.