Entity-based Reinforcement Learning for Autonomous Cyber Defence