Rory McIlroy came within a whisker of making a spectacular hole-in-one at the second as he made a confident start to his final round of the BMW PGA Championship.