Replace use of wfErrorLog() with MWLoggerLegacyLogger::emit()

When the logging service used by MediaWiki is not MWLoggerLegacySpi, the
behavior of the legacy wfErrorLog method is not guaranteed.
MWLoggerLegacyLogger::emit() is the suggested replacement for use cases
such as this one where the desired log destination is either a file or
a UDP endpoint.

Change-Id: I95f217e5bef9144468a79834321dff327476d66a