Demographic, Legal, and Clinical Predictors of Long-Term Trial Competency Restoration