For some, single-sex schools are centres of excellence. For others, they entrench sexual stereotypes and gender inequality. Sifting through centuries of debate, girls’ school deputy head David James ponders the future of this approach in a society that is increasingly progressive, meritocratic and diverse