Bug fixes and new functionality in CSV parser.
New function for generating padded integers.  Adapted from code originally written for delphi_general_purpose.
Changed questionable design decision in the original code: field names and fields are now both numbered from 0, rather than from 1 and 0 respectively.