respect keyboard height when providing window height in softinput resize mode

Fixes popups not centering properly when keyboard is opened and closed (fixes #2385).

![screenshot_2014-08-05-11-51-02](https://cloud.githubusercontent.com/assets/1126441/3815029/bd3ddd64-1cc0-11e4-9a95-615e232ba18c.png)