BLD: ci/print_versions.py learned to output json

Contortions due to lack of OrderedDict in 2.6
Should be runnable indep. from pandas.compat being available
Avoid duplicating the OD polyfill here as well. Oh well.
Merge pull request #5738 from y-p/PR_json_pr_ver

BLD: ci/print_versions.py learned to output json