Fixed null-pointer error in Graph destructor (edges must be deleted first, because they try to access Node properties)