libpromises/evalfunction.c: let mergedata() use VarRefValueToJson
Merge pull request #1587 from tzz/refactor/mergedata/VarRefValueToJson

libpromises/evalfunction.c: let mergedata() use VarRefValueToJson