The Somerset headteacher is stepping down after years of service at the historic school