preparation for decoding.

restore the raw_pkt access, will be needed by decoders (and encoders maybe).
restore and enhance raw C-packet access

needed by decoders.
Resync with hg.