dtlib: type annotate public functions

Some of these are also tripping up a python 2 / python 3 warning
in mypy in the way that '{}'.format(b'foo') works, which we silence by
explicitly requesting the python 3 behavior.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
1 file changed