dav1d_flush fixes
lib: also free internal buffers when flushing with one frame thread
As the name suggests, we were not freeing most buffers when frame threads == 1.
lib: explicity free the metadata buffers in dav1d_close()
This is so freeing all allocated buffers doesn't depend on dav1d_flush() behaving correctly.