Debugging and testing improvements

 * Factor out the generic method to go ver all children of a node,
   while building xpath expressions incrementally
 * When discarding a node because it's empty, mark it (and all descendents of it)
   as irrelevent
 * When discarding a node because it's content is not present in it's parentn's
   content (so it's probably invisible), mark it (and all descendents of it)
   as mystery.
 * Improve the internal consistency checking methods to give more information,
   and add verbosity control.
 * Improve the internal consistenct checking methods to avoid giving false alarms
   on irrelevent and mystery nodes.

properly handle irrelevant and mystery nodes when doing consistency