With Democrats in control of Congress, the president’s military and foreign policy priorities face budget cuts and investigations.