Make sure unit tests compile

This fixes the unit tests that were broken by r403069 and several
functions requiring a new parameter for sanitization of JSON messages
generated from object snapshots.
........

Merged revisions 403094 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@403095 f38db490-d61c-443f-a65b-d21fe96a405b