Tests for MWExceptionHandler::jsonSerializeException

MWExceptionHandler::jsonSerializeException was introduced in Iacda90fb4. This
patch add tests that verify that JSON-serialized exceptions have the right set
of keys with the right types of values.

Change-Id: I37f2a837e2d26bf9780e56edc7ec039e8e447525