build-unit-test-docker: pythonic refactoring

Do a bunch of clean-up to the script to better / modern Python
practices.

    * Document the PackageDef dictionary.

    * Add type hinting so that 'mypy' static analysis passes (and
      code self-documents better).

    * Create a Package class to encapsulate everything related to
      package stage builds and a Docker namespace to encapsulate
      Docker operations.

    * Overall better documentation.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I841d844aa9401889d428ed55c10bee6c1b0a7109
1 file changed