Make the net logging code more compact.

The generation of the lookup table between errors and strings for
the net log expanded to 37 KB, due to the repeated code. Rewriting
the code to a loop and it shrank by roughly 75%.

Total change: -32087 bytes
==========================
  3 added, totalling +960 bytes across 1 sources
  60 removed, totalling -1143 bytes across 1 sources
  1 shrunk, for a net change of -31904 bytes (36336 bytes before, 4432 bytes after) across 1 sources

BUG=
R=mmenke@chromium.org

Review URL: https://codereview.chromium.org/574433002

Cr-Commit-Position: refs/heads/master@{#295338}
3 files changed