Refactored treedepth method, added treewidth test

refactored the tree depth method, now there is a public method which
calls the original (now private) tree depth method with the root. This
is to avoid another class taking depth from say 2 levels down and make
it match simplicity of tree width calls. Added tree width test and
refactored tree depth one to make more sense.