Make radeapclient build/work in 3.0.x branch

My goal was to have a working version of radeapclient in 3.0.x, *not* to
improve it in any way (for now).
Here is what I did:

1. make the build work.
This includes the following changes:

- undefined references: SSL_*
-> added to .mk: -lssl

- undefined references: radlog_request, radlog_request_error,
rad_assert_fail, radius_exec_program, cf_data_find, cf_section_parse,
cf_data_add, cf_pair_find, cf_pair_value, cf_item_parent,
cf_section_sub_find, cf_sectiontoitem, cf_section_sub_find_name2
-> added to .mk: libfreeradius-server.a

- more undefined references:
pairlist_read, pairlist_free -> main/files.c
rad_fork, rad_waitpid -> main/threads.c

- undefined reference: mainconfig
-> added to radeapclient.c:
struct main_config_t mainconfig;

- problem with "const" qualifiers in FreeRADIUS structures.
Using non "const" pointers to make it build/work.

2. fix the segmentation fault issues.
This includes the following changes:
- after each "paircreate" for an octets or string attribute, allocate a
buffer for vp_strvalue (or vp_octets) through talloc_zero_array (or
talloc_memdup).
- use a talloc'ed eap_packet_t (instead of a static variable) in
functions map_eap_methods and map_eapsim_types (because it is used as a
talloc context by called functions).
- fix the free -> talloc_free issue in eapsimlib.c

3. removed a check that made no sense in sendrecv_eap.

4. tested for EAP/SIM.
NOT tested for EAP/MD5, although I corrected the missing allocation in
the related code.
Fix crash in krb5 when acquiring the TGT fails

rlm_krb5 will log the error code but continue anyway, so any kind of
failed Kerberos authentication (unknown user, wrong password, etc.)
would instantly crash radiusd.
Reorganise fields in value_pair_tmpl_t
Unused assignment.
Check for NULL before doing anything else
Cache handle from dlopen
In some strange cases, lseek may return an error
Check parameters passed to paircmp()
outfp may be MULL
The debug_stream needs to be in 'inst' to be used for debugging
Fix last commit to unbound
Merge pull request #589 from nchaigne/v3.0.x

Make radeapclient build/work in 3.0.x branch
Use pairmemcpy in more places
Remove unused variables
Remove @todo.  It's done
Fix tmpl2str.

If may be given a NULL tmpl, if we're printing a "case {"
It's better to do it here instead of in every caller.

Handle xlat && regex structs.

Fix checks for too little room on escaped characters.
typo
Future debugging
Parse "foreach" into a vpt, and do sanity checks on it
Use tags in "foreach"