client::Console: move cleanup to destructor

Also add missed delete of editBuffer
world: use range-based for loop
Store Entity (rather than pointer) in world array

Also replace direct pointer access to Entity with EntityRef, a
temporary pointer to an Entity that cannot be held across entity
additions or deletions.