Switch to using explicit template types

Add support for copying lists to rlm_cache

Add more sanity checks to rlm_ldap and rlm_cache

Reformat more code in rlm_ldap