mds-kbdc: simplification + remove debug code

Signed-off-by: Mattias Andrée <maandree@operamail.com>
mds-kbdc: make-tree: simplification

Signed-off-by: Mattias Andrée <maandree@operamail.com>
mds-kbdc: make-tree: make large macros into functions

Signed-off-by: Mattias Andrée <maandree@operamail.com>
mds-kbdc: make-tree: m simplification

Signed-off-by: Mattias Andrée <maandree@operamail.com>