The Near-Infrared Luminosity Function of Galaxies in Close Major-Merger Pairs and the Mass Dependence of the Merger Rate