CI: marshal into JSON and fix escaping issue
Created by: jhchabran
YAML marshalling is sometimes a bit unpredictable and led to having strings generated with different quotes, with different escaping rules.
See the differences here:
- on a build being triggered: https://buildkite.com/sourcegraph/sourcegraph/builds/112994#54737138-d5be-465f-8312-77d8304aff43/61-98
- on a build being restarted: https://buildkite.com/sourcegraph/sourcegraph/builds/113016#282f6444-7c69-4818-bf4f-4f2aec1f7758/55-92