Fix setWindow for Android

Fixes issue #2210

Use `getWindowHandles` instead of `getContexts` in `androidController.setWindow()`. I've also fixed the old tests, and added deprecation warnings to the window methods.