SECURITY: Sanitize ResourceLoader exception messages

Prevent path disclosure when $wgShowExceptionDetails is false

Bug: 52746
Change-Id: Ia14ae21972192d291cb86dce65568e9e8b4674f7