move register_system function to EntityManager

the old approach where it was on ComponentManager didn't correctly
handle dependencies