API: Add pgm_is_ancestor() and pgm_is_descendant()

This patch adds routines to check if one node
is an ancestor/decendant of the other.
Tools: Add ancestortest to test pgm_is_ancestor().

This patch adds the 'ancestortest' tool to test
pgm_is_ancestor() and pgm_is_descendant() routines.
Tools: Correct error checking macro.

This patch corrects the error checking macro
used by many test tools. Old macro executed
the routine to check twice, instead of just
once.