Patients may live longer after hip replacement, study suggests