Major merging history in CANDELS. I. Evolution of the incidence of massive galaxy-galaxy pairs from z = 3 to z ∼ 0