Boeing posts loss as 787 jet deliveries stall with ‘no firm end in sight’