New class for JSON Reference error messages

Make RefSanityChecks use it, along with similar referencing errors in other
classes.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>