Ontario agrees to end solitary confinement for mentally ill inmates