ImpermanentGraphDatabase.cleanup should delete all nodes

This fixes a bug where certain graphs could confuse the cleanup method
into leaving some nodes behind.
Merge pull request #1463 from chrisvest/fix-impermanent-graph-db-cleanup

ImpermanentGraphDatabase.cleanup should delete all nodes