Factor out the summary parsing routine
Factor out the summary parsing routine

twopass_in() is a function that does too much at the same time:

- It initializes the second pass rc.
- It provides the user the amount of bytes the same function would like to
  consume next
- It consumes and parses the initial global header, called summary in the code.
- It consumes and parses the per-frame information, depending on the
  configuration either a single per-frame data packet or a variable number of
  them in a single pass.

Move the summary parsing routine in a separate function and document it a
little.

xiph/rav1e,xiph/rav1e