Boeing lost more than $1.4 billion in the second quarter and said a longtime industry executive will take over as chief executive of the troubled aircraft manufacturer next week.