Paramount settles with US states, union to win Warner Bros takeover