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