Cubist Pharma takes 3rd-quarter loss on costs from Trius and Optimer deals and other charges