py2 to py3 conversion and style fix

* Convert all scripts to python3
* Update python3 pylintrc / pylint repohook
* Address style issues flagged by pylint
* Minor refactoring

BYPASS_INCLUSIVE_LANGUAGE_REASON=pylint config file

Bug: 180712476
Test: pylint mkbootimg.py unpack_bootimg.py
Test: repohook
Test: atest --host mkbootimg_test
Test: python3 -m doctest -v tests/mkbootimg_test.py
Change-Id: Ice79e697ab77f602843ed8cf40ff665d6f9ca30d
7 files changed