hevc: implement flushing and add CODEC_CAP_DELAY

Conflicts:
	libavcodec/hevc.c
	libavcodec/hevc.h