Modify bitstream reader to allow parallel parses.

This is a resubmission of CL https://codereview.chromium.org/1838203002,
after it got reverted.

The previous CL fixed class NaClBitstreamReader to allow parallel
parses. In particular, it made the global abbreviations a shared object,
so that it can be shared by other bitstream readers.

To make the overhead small, the lookup map of global abbreviations was
initialized up front with all known block IDs, rather than incrementally
updating. This reduced the locking considerably in that the block ID
lookup no longer needs a lock.

The reason that the previous CL was reverted was because of the
presumption that all block IDs are known. This meant that the bitstream
reader had to deal with bad block IDs. This breaks the parsing
philosophy that the issue should be returned to the parser so that it
can report the error appropriately, and if possible, error recover as
well.

The fix added to the previous CL is to add a second "unknown" lookup map
that uses a lock to update. This restores the incremental behavior, even
if much slower. Since such unknown cases represent error cases, the slow
behavior should be acceptable.

This code also assumes that parallel parsing is done with 1 driver parse
thread, and n helper parse threads to parse function blocks. The
driver thread is responsible for parsing the memory object, and
spawning off parallel parses for each function block. To guarantee
correctness (since memory objects may be dynamically filled), the
driver parser should build a buffer and copy the corresponding bytes
of the function block into that buffer, before spawning off the
parallel parser to parse it.

BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4363
R=stichnot@chromium.org, jpp@chromium.org

Review URL: https://codereview.chromium.org/1843673003 .
2 files changed