Issue #2559969 by alexpott: Make SafeStringInterface extend \JsonSerializable so we don't have to do so much string casting