internal/number: implement more formatting

- simplified API
   - use MinExpDigits to determine whether to use
     scientific or decimal.
   - test added to verify that this is correct.
- reuse percent pattern for permille:
  - use DigitShift instead of Multiplier
- added support for padding
- copy Pattern, instead of using pointer, to allow
  tinkering
- small fix for quoting.

Change-Id: Ib83ab28f2cad57e90d73bb30b346ab7845a56333
Reviewed-on: https://go-review.googlesource.com/46157
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
6 files changed