A superb second-half fightback earned Aberdeen all three Scottish Premiership points at Pittodrie and consigned Kilmarnock to a 10th straight game without a win.