HPCC-9007 Soapplus comparison not comparing root node

The problem is caused by the fact that the initial root tag wasn't passed
to diffPTree and printPTree functions, as a result the diff printouts
don't contain the root node, although root node did actually get compared.
Also improved a bit on edge condition checks.

Signed-off-by: mayx <yanrui.ma@lexisnexis.com>