[dev.typeparams] go/constant: choose internal float representations more consistently
go/constant represents a Float constant either as a rational number
(if numerator and denominator are small enough), or, as a "catch-all",
as a arbitrary-precision floating-point number.
This CL cleans up some of these transitions by factoring out more
of the decision logic and documents the rationale between the state
transitions better.
This CL also simplifies some unrelated code that was overly complex.
Updates #43908.
Change-Id: Iccdd2d6b7fb7ed13d68ed5e6d992d1bc56a065bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/286572
Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>