Improve performance of integer formatting (#76726)
* Improve performance of integer formatting
1. The DivRem(..., 10) for each digit in the number ends up being the most expensive aspect of formatting. This employs a trick other formatting libraries use, which is to have a table for all the formatted values between 00 and 99, and to then DivRem(..., 100) to cut the number of operations in half, which for longer values is meaningful.
2. Avoids going through the digit counting path when we know at the call site it won't be needed.
3. Employs a branch-free, table-based lookup for CountDigits(ulong) to go with a similar approach added for uint.
* Address PR feedback (move license notice)