Fix segfault when rlm_rest walks the attributes

I'm not sure this is the ideal fix because I haven't devoted the time
needed to understand the whole freeradius 'picture'.  But the json
version of rlm_rest was dereferencing a null ptr while walking attributes.

(An analogous fix is needed in the form post variant, but I'm mostly just
submitting this CL for comment in case there is a cleaner solution)