Zed uses JSON5 for settings files. JQ doesn't understand that format and
fails if found, when merging with preexisting settings.
Here I add a conversion step that converts JSON5 to JSON before handling
the contents to JQ.
Besides, I changed the arguments in the jq function, so instead of using
`[0]` and `[1]`, we now use `$dynamic` and `$static` respectively. This
should make scripts more readable.
Fixes https://github.com/nix-community/home-manager/issues/7247
Fixes https://github.com/nix-community/home-manager/issues/7226