Made SystemManager a friend of EntityManager. SystemManager now clears the changed/removed entities from EntityManager after all systems have been processed.