Rangers leapfrogged Celtic to move second in the Scottish Premiership with a compelling 4-1 win over lowly Aberdeen.