Gracefully handle weird characters in compiler output.

Previously, if the compiler's stdout/stderr contained some garbage, the JSON
encoding would fail as it tried to encode it as UTF-8. This patch prematurely
encodes it into Unicode, but also tells it to ignore any errors. This may be
lossy, but we don't care for compiler output - we'd rather see an approximation
than have a worker crash because it can't encode JSON.