Fix finalizing uninitialized encoder states
Fix finalizing uninitialized encoder states

Finalization functions for frame and tile encoder states accessed the
frame and tile fields of the encoder state even though they might be
NULL. This is the case when the initialization of an encoder state
fails. Fixed by adding NULL checks.

ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar