ImpermanentGraphDatabase.cleanup should delete all nodes

This fixes a bug where certain graphs could confuse the cleanup method
into leaving some nodes behind.