core: z_utils:json_escape now points to right function in z_json

(cherry picked from commit ea1c37f4f875b6723cd7872aacf238b29cfc9110)