Misc. fixes

- the expansion of the define-wbtree macro referenced the struct type
  node, which no longer exists (is now called wbtree)

- wbtree-find was broken, trying to pry the node-value from the given
  key value instead of the node found

- added the check-invariants function as a first step towards testing;
  the errors would have been found by even the most superficial unit
  test, which makes things emberassing.