Use clientcert name instead of hostname

Stop using hostnames in setting up the classroom environment and use certificate names instead.
This is a better practice and makes life much easier in the windows course because the hostnames can be changed by Active Directory.
This PR also adds a custom function for getting the machine name from the FQDN base cert name.
sorry, this was my misreading. This is good.