extstats: change output functions to emit valid JSON
Manipulating extended statistics is more convenient as JSON than the
current ad-hoc format, so let's change before it's too late.
Discussion: https://postgr.es/m/
20170420193828.k3fliiock5hdnehn@alvherre.pgsql