(maint) Fix quoting of keys and values in YAML output.

Previously we were just always double quoting all values in the YAML
output to workaround the fact that yaml-cpp will output numerical string
values without quotes which loses their type information as strings.

However, this also affects keys within maps.  Rather than quoting every
single string in the YAML output, which is an eyesore, this commit works
around the yaml-cpp limitation by quoting anything that looks numerical
in keys and values.