Allergan says second-quarter profit rose, announces cost cuts