Output a BOM when exporting dynform data to CSV

This helps at least one user of Excel 2007.
Always use the aqua_fputcsv() function instead of fputcsv() because its CSV output is more robust.