add json_encode()ded endpoint to PHP releases list + other small nit adjustments

We keep warning community to never unserialize remote or untrusted data but
at the same time php.net only offers a serialized endpoint for PHP
releases. This commit:

- adds a JSON endpoint that can be an option to avoid the serialized endpoint
- sets a propper Content-Type response header for both serialized - `text/plain` -
and json - `application/json` - endpoints
- simplifies URLs exchanging `&serialize=1` and `&json=1` for `&serialize` and
`&json` respectively