S.F. hotel workers agree to go back to work