vpu5: Make sure that all frame memory is freed on failure

When a call to mcvdec_uf_get_frame_memory() fails, it should free any
buffers and the managment structures that it has successfully created
before exiting.
vpu5: deinit PMB on decode completion

The PMB setting was not cleared after playback completed.
vpu5: Only initialize IPMMUI conversion once per stream

mcvdec_uf_get_frame_memory() may be called multiple times if the memory allocation
fails.  Even if this happens, the ipmmui should only be initialized once.
vpu5: m4vparse: Copy buffer offset from old buffer when expanding

When resizing a parser buffer, the contents of the old buffer were
copied to a new, larger buffer, but the metadate describing how much of
the old buffer was filled was not.
vpu5: avc parser: Clear all meta data when flushing

Clear all parser metadata back to the initialization values whenever the
flush callback is called.  Clearing only some of the data can leave the
parser in an undefined state.
vpu5: free picture data on flush

When a buffer flush is performed, make sure that the picture data
from the picture queue and any memory allocated with pmem_alloc() is
freed.
vpu5: Cleanup memory leaks

Clean up several outstanding memory leaks that were revealed during testing.
vpu5: avcparse: Properly compute size of last nal unit

The size of the final nal unit (after receiving an eos) was off by
1 byte.
vpu5: avc parse: Try to access the first MB flag only when it should be present

The first macroblock flag as defined in the slice header may not
be present in all Nal units. Specifally End of stream and End of sequence
Nal units do not define RBSP bits, and typically appear as the
last Nal unit of the stream.  Trying to access a non-existent byte to
find the first_mb flag can lead to a segmentation fault in this instance.