API: Run dav1d_init under pthread_once
This makes the function thread safe, to call, for example, from multiple transient dependecies or threads.
NB: Wasn't sure if it's OK to put a global pthread_once_t variable in lib.c, or if there's a more preferred place.