Selecting or rewarding teachers? International evidence from primary schools