MediaLibrary: Set logger before acquiring file lock

Merged Alaric Sénat requested to merge asenat/medialibrary:fix/lock-file-crash into master

File locking will attempt to log on failure (ie: the medialib is already locked). As fc002ae1 removed s_logger null checking, logging before constructing MediaLibrary dereferences nullptr.

Merge request reports