rewrite bitfield conversion in slugs interface
rewrite bitfield conversion in slugs interface

- bug fix: dict item order is not dependable (using "first" can yield incorrect results). Use list instead.
- the LSB bit name is known, searching not needed
- rename the functions to reflect their purpose
- add docstrings
- pep8: snake case var names
- use short names for local vars
- use str.format for readability
- iterate over bits, math not needed
tulip-control/tulip-control,necozay/tulip-control,tulip-control/tulip-control,necozay/tulip-control,tulip-control/tulip-control,tulip-control/tulip-control,necozay/tulip-control,necozay/tulip-control,necozay/tulip-control