Add util directory.

Functionality that doesn't belong into core but should be available to
different projects resides inside the util dir.
Move tapping to own class.

Not every key needs to distinguish between a tap and hold state.
Convert bitfield to basic unsigned types.