A century of change in global educational inequality and gender differences in education