Fix json produced by /profiler/realtime when there is a double quotation mark in a command.
(cherry-picked from 5328769)
Fix #1069 Problems with prepared query parameters in nested query