Extract `fetch-version.ts` which is called at build time to create
file `dist/api/version.json`.
This file is read by `backend-info.ts` at runtime.
This also fixes handing over the Git commit hash to the backend app
in the Docker backend image, which was broken as of 2022-07-12.
(Reason: The commit hash was previously required at runtime, but was
only provided at build time.)