Judge says San Francisco mayor's brother can be resentenced