725366 - Formula Parsing Error with Scheduled Mortgage Transactions

Clamp per to nper so that the random value from gnc_sxed_check_consistent
doesn't create overflows with ridiculous values.
Use more significant digits for SX function returns.

gnc_sxed_check_consistent() was failing to balance mortgage payments with
large payments or small interest amounts because of rounding errors with
only 6 significant digits. Using 18 causes values < 1 to overflow, so I
compromised on 12.

Also log an error and return NULL if there's an overflow, since the value
won't be useful.
double_to_gnc_numeric: Return overflow error immediately on invalid input.

Which is either nan or outside the range that gnc_numeric supports.
Also extend the powten array to support the full range of gnc_numeric.