Move some YAML output logic to urbansim.utils.yamlio for re-use.