Cleanup tmpl function names
Switch foreach to use tmpl_copy_vp

We have to fudge the config parser a bit to convert &attrref -> &attrref[*] but it works, and the code is quite a bit nicer.
Break out validation logic from realm_home_server_add
Fixes for previous commit
Update freeradius.spec

rlm_rest module needs libcurl-devel package.
Merge pull request #766 from RoJackal/patch-1

Update freeradius.spec
Missing semicolon
Whitespace
Include trailing zero byte for LEAP
Add tmpl_cursor_next and tmpl_cursor_init which allow iterating over VALUE_PAIRs in the current request with a value_pair_tmpl_t

Rewrite tmpl_copy_vps and tmpl_find_vp to use the new cursor functions.

The iterators are significantly more useful than tmpl_copy_vps or tmpl_find_vp, but those functions
are still quite convenient.
Doxygen
Detail file writer should always print pairs with '=' operator
Fix lintian debhelper-but-no-misc-depends

Add ${misc:Depends} to all binary package deps (even though it's
silly for e.g. freeradius-config).
Fix lintian binaries-have-file-conflict on libfreeradius-dev

This is clumsy at best. It would not have been necessary if
freeradius "shared" libraries could have a SONAME, ABI etc.
according to Debian policy.
Fix lintian duplicate-changelog-files

If we are doing dh_installchangelogs, it seems we need to exclude
the upstream changelog from dh_installdocs so as to not install it
twice.
Override lintian binary-or-shlib-defines-rpath on freeradius (due to
rlm_python), freeradius-postgresql, freeradius-iodbc
Override lintian breaks-without-version, package-relation-with-self,
python-script-but-no-python-dep on freeradius-config
Fix JSON encoding, where training '}' may not be written correctly for certain input buffer lengths
Need to get the current attribute from the cursor in READ_STATE_ATTR_END state
Don't run panic_action if the process is being debugged