Cleanup

 - move the discovery code to a separate class
 - move common helper functions to a separate class
 - debug functions now always print the caller function
 - autodiscovery tested to work with google.com and icloud.com
   (i.e., it is sufficient to enter "google.com" or "icloud.com" as URL)
 - simplified cdfopen() API a bit
add license info for distributed libraries