mpegvideo: synchronize AVFrame pointers in ERContext fully

Since error resilience uses AVFrame pointers instead of references it
has to copy NULL pointers too. After a codec flush the last/next frame
pointers in MpegEncContext are NULL and the old pointers remaining in
ERContext are invalid. Fixes a crash in vlc for android thumbnailer.
Reported and debugged by Adrien Maglo <magsoft@videolan.org>.
h263enc: keep block_last_index always valid during advanced intra coding

Prevents a triggered assert during fate-vsynth{1,2}-rv20 in
dct_unquantize_h263_intra_c().
Merge commit '0ddc53dabbc6f636d062b187ea27934610aaad30'

* commit '0ddc53dabbc6f636d062b187ea27934610aaad30':
  mpegvideo: synchronize AVFrame pointers in ERContext fully

Conflicts:
	libavcodec/mpegvideo.c

See: 8ef9dcf1d74aea55bf39f1e479fe67e98d973954
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'cd62c04d009b3baf7582556866a7029291b54573'

* commit 'cd62c04d009b3baf7582556866a7029291b54573':
  h263enc: keep block_last_index always valid during advanced intra coding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
x86: huffyuv: fix {add,diff}_int16

They used an extra, undeclared register. Fixes a crash in
fate-vsynth3-ffvhuff444p16

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>