Use win32 API to get user info in `user.info`

Fix #14679.
Added some other improvements.