encode: release derived image of input surface after data uploading

driver does strict check on buffer owership upon vaBeginPicture() now.
It's  better if we can  use smart pointer manage VaapiImage. Manually release memory is tedious and error prone.