network.api: Check if the node is root before returning parent, and add isRoot function.
network.api: Check if the node is root before returning parent,
and add isRoot function.

htem/CATMAID,fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID