Dow, DuPont agree to merge, split into three companies