refactor/generalize from_decimal_string to parse more than 4 digits

In short, proper overflow check is being done.

This change is groundwork to a future change that will make use of
from_decimal_string.