sdk.Runtime is process-wide, so setting the tenant back to nil on cleanup
could overwrite a mapping another test had installed. Save the previous
value and put it back, as common/middleware/db_test.go does.
SaveOperaLog shortens JsonResult to 100 characters before writing it.
#944 changed that from a byte cut to a rune cut, but no test referenced
it, so putting the byte cut back would turn nothing red.
The test drives the real SaveOperaLog with 150 three-byte characters and
reads the row back: the stored value must be valid UTF-8 and keep exactly
100 characters. With the byte cut restored it fails with an invalid
trailing byte and 34 characters kept.