Simplify tree interface

- drop the awkward union of values, replace with std::unique_ptr's of
  each possibility.  This takes more space per node, but is harder to
  break.

- add tree &tree::child (size_t) (and const variant) to simplify
  accesses to children (there was an awful lot of .m_children[X],
  and .m_children.front in tree.cc).
Extract slot_idx into a separate module
Implement operator<< instead of tree::dump, use throughout
Move src_a, src_b, dst handling to a separate class slot_coords

- Also, use slot_idx and boost::optional <slot_idx> instead of
  ssize_t (depending on the context).