Implement `Hash` for the remaining types in `std::num`

Updates #15294.