Init RankMgr pointer to NULL
Delete the entity before removing from the list

Old code was calling dereference on invalid iterator
Changed null check to assert

Changed the null check to clarify that the function should not be called before the entity has been attached to a world.
Removed isDone check

The same data is returned by executeStep so why execute a call when you have the data.
Fixed style.
Merge pull request #1365 from mc-server/coverityFixes

Coverity fixes