SF gets $2 million to avoid building new jail, shrink inmate population