Rory McIlroy was emotional after becoming the first European men's player to complete a career grand slam of golf's majors.