Keep count of lists and of instructions by opcode.

This enables us to calculate correctly the upper bound on the size of a
DFA state. It also enables us to downsize safely the stacks preallocated
by the DFA and NFA execution engines.

Change-Id: I612ffbd37bbc9ee1237d693dd91a30cb9003e202
Reviewed-on: https://code-review.googlesource.com/4502
Reviewed-by: Paul Wankadia <junyer@google.com>
6 files changed