Updates Entity::getComponent() for const correctness