Evolutionary dynamics of recent selection for enhanced social cognition