av1: enhance av1dec/enc
Here are some minor enhancements of av1 decoder/encoder which provide to set a number of threads and row-mt configuration(for the encoder). In addition, added to missing unlock when failing to initialize encoder.
I rebased the old branch but the changes were gone in the previous MR !70 (closed) , so I recreated MR.