functions-public: refactored for JSON/YAML output

- Refactored old script into stub scripts that call the main script,
  asking for YAML or JSON output