BUG: Fix csv.QUOTE_NONNUMERIC quoting in to_csv
Closes #12922: "bug" traced to #12194 via bisection, where the float formatting was unconditionally casting everything to string.

I say "bug" (with quotations) because the changes to `get_result_as_array` did **correctly** cast everything to string as per the documentation (i.e. it had inadvertently patched a bug itself even though it was just a cleaning PR).  However, the changes had overlooked the impact it would have on `to_csv`.
