Meritocracy dissolves the efficiency-equality tradeoff in public-goods games