Flush on bolt emit, and properly encode nested strings in ShellMsg.MarhsalJSON