Various improvements of the input functions - both for NUMERIC32 and
NUMERIC64 (detection of various syntax errors, improved regression
test and so on).
Proper rounding in AVG aggregate both for NUMERIC32 and NUMERIC64.
Code shared by numeric32_in and numeric64_in moved to a separate function.