rustc: make integral type inference transactional, close #3211, close #4401, close #3398.