Fall back on flushing if finishing is not implemented.

This allows for codecs which don't implement a finish function but do
have a flush function to work as expected when calling finish.

Signed-off-by: Evan Nemerson <evan@coeus-group.com>