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: I585daf95e6187b91cddac6130f8f690f33aacbb6