nalu: Integrate some common parts between AVC and HEVC.