Fix code style in capi.

Signed-off-by: Tang Xin <xin.t.tang@intel.com>
encode: release derived image of input surface after data uploading

driver does strict check on buffer owership upon vaBeginPicture() now.
Add encode/decode input class and capi wrapper, add encode and decode test in C.

Signed-off-by: Tang Xin <xin.t.tang@intel.com>