Southwest Airlines and the Aircraft Mechanics Fraternal Association (AMFA) have agreed to terms on a new contract that, if ratified by mechanics, would end more than six years of often-contentious talks.