It's expensive and time-consuming, but a court can help cure the hard-core homeless problem in San Francisco