Fixing popup focus behavior and issue #213

Fixing the popup behavior and dpi bug

Popups did not behave the same as chrome popup because of how the mouse was captured. I needed to add custom events to mousein and mouseout on the popup to set focus and capture mouse on the popup hwnd instead of the parent.

Simply refactoring a little and adding the transform to the popup on creation fixed the scaling issues when the window DPI was changed. 

(PS. separating pull request in #313)