virttest: Make Numa related functions can work on host have disabled node

Now the functions and classes caculate node id by nodes number. And
in a host have disabled node, it may give scripts the disabled node
id. This patch will fix this problem by use available nodes to decide
the node scripts should use.