The Senate confirmed two cabinet nominations — James N. Mattis as defense secretary and John F. Kelly as secretary of homeland security — but Democrats temporarily held up Mike Pompeo’s confirmation as C.I.A. director.