Nernst effect and three-dimensional temperature gradients in magnetic tunnel junctions