Fix the PNaCl translator to lock the dump stream when printing errors.

The previous code did not do this. Also localizes the lock to when
the error is actually printed.

Note: requires https://codereview.chromium.org/865963002

BUG=None
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/864383002
1 file changed