Adds a machine-readable output mode to `flask routes`. When --json is
passed, the route table is emitted as a JSON array instead of the text
table. Each entry has `endpoint`, `methods` (sorted list), and `rule`;
subdomain apps also emit `subdomain`, host-matching apps emit `host`.
HEAD/OPTIONS are filtered unless --all-methods is also passed. Empty
apps produce `[]`. The --sort flag is honoured in JSON mode.
Backwards compatible: the flag is optional and all existing invocations
of `flask routes` are unaffected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>