SEATTLE — The state of Washington has agreed to a plan to resolve a lawsuit filed on behalf of mentally ill people who’ve been warehoused in jails for weeks or months while awaiting competency services. A settlement reached Thursday between Disability Rights Washington and the Department of Social and Health Services is designed to bring the state into compliance with a judge’s 2015 ruling that said the state was violating the rights of its most vulnerable citizens.