ctdb-tools: Reimplement read_nodes_file() using ctdb_get_nodes_file()

Update the implementation of "ctdb xpnn" and "ctdb listnodes"
accordingly.  Update associated tests too.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
