avcodec/pngdec: mark previous_picture as done on end of decode_frame_common()

Fixes deadlock with threads

Found-by: Paul B Mahol
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
