py3 imports and types

- winreg import
- urlencode import
- use bytes() before decoding
- use b'' before doing string operations like startswith

Change-Id: I2f8c2fb06115c735a499d24dd333e3854a4d6cc2
Merge "py3 imports and types"