dxva2_hevc: re-write reference frame handling

The old logic required and explicit clearing of the lists first and was
prone to overflow the DXVA2 struct in some circumstances.

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