avformat: Add ff_tls_init()/deinit() that initialize OpenSSL

If the application hasn't set up mutex callbacks, we set up
our own using pthreads (or w32pthreads).

Signed-off-by: Martin Storsjö <martin@martin.st>
