Fix JSON (and others) handling in rlm_rest

rlm_rest seem to to have two small but serious errors.  Here's a small/clean fix.  Thanks for your work on this great project.

1) The enum for http_body_type had changed, so the indexes being used to
find handlers were off by one - so unless you were really lucky you would
probably get the wrong body parser for the server response.
2) json_object_get_type returns an enum which was being dereferenced as
a pointer (causing a segfault)