Anneliese Dodds has quit as international development minister over the decision to cut overseas aid to fund a boost to defence spending.