Refactor the IsKeyboardPresentOnSlate function.

Currently this function shares the same logic as the IsTabletDevice function. One of the big differences was the
IsTabletDevice function allows calls from Windows XP. Changed that to Windows 8+ and changed the IsKeyboardPresentOnSlate function
to call IsTabletDevice. The IsTabletDevice function now takes in a reason argument which is updated with the reason info as to
why the device was deemed to be a tablet or not.

We now use the PowerDeterminePlatformRoleEx API to determine the platform role. As per msdn this function returns better results on Windows 8+.

Next step would be to see if this function reliably works for tablets and slate mode. If yes then we can possibly flip the switch
kDisableUsbKeyboardDetect to kEnableUsbKeyboardDetect which would ensure that the OSK pops up by default.

BUG=497381
TBR=sky

Review URL: https://codereview.chromium.org/1535643006

Cr-Commit-Position: refs/heads/master@{#368241}
3 files changed