Factors associated with short- and long-term outcomes in lung cancer patients requiring unplanned invasive mechanical ventilation.