Log JSON-formatted exceptions to 'exception-json' log bucket
Much of the original scope of this patch has been made redundant by other
patches, so it's nice and compact now. This patch makes MediaWiki serialize
exceptions to JSON and log them to an 'exception-json' log group.
To facilitate this, two related changes are included:
* Consolidated the code for annotating the exception with the request URL (if
the exception was encountered while responding to a request) in a method,
Exception->getURL.
* Removed the code path that checked for a falsey return value from
$wgRequest->getRequestURL() and set the url to '[no URL]'. ('[no req]' is
retained.) Nowadays getRequestURL() always returns a string (or throws an
exception). Wikimedia's cluster doesn't have a single '[no URL]' in its log
archives, which go back several months.
Change-Id: Iacda90fb401f6a45ed1ac1a991e0884663e6c0bf