Add basic reference frame handling.

This allows inter frames to proceed to actual block parsing, where it
fails because inter frame handling is completely missing.