Tighten permissions on judgedaemon output files.

Testdata and judgings stored on the local filesystem by the judgedaemon
will have minimal permissions set. Open up the permissions of the workdir
at the start of a run, so the domjudge-run user can access it. Revoke those
permissions afterward.

This improves security for the case where chroot is disabled, because
submissions can no longer read reference testcase output files, or those of
other submissions. However, we still recommend against running with chroot
disabled, as there are othe potential surprises possible.

Cherry picked from 06b87b8e, b160d127, c7324edb.
Add test source exhibiting problem with compile time testdata access.

Cherry picked from 1d0264e838bd1cf91139838f3ef0293768e19f8f
Use unprivileged user to compile program to make sure that it
doesn't have access to e.g. testdata files.

Cherry picked from 75a674efa45c9cbc82c0af5238be2f084bf6a25f
Permit domjudge-run access to judging directory already at compile
time and revoke permissions dir after compiler-error.

Cherry picked from c548ab307d60c8018fa80b71e6e1e378f140cf0e
Add changelog for compile security issue and note on large code change.