Graph: add functions to delete nodes

* Update clear.
* Add getNbNodes and getNbConnections.
* Add deleteUnconnectedNodes.
* Add pyTests.