enc_qsv: factor out buffer list linking.
encqsvClose: fix a memory leak.