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.
Ok, I took a look at the function.  Unless I'm misunderstanding how this is implemented, I think we're ok here.  I also changed the username to be based on machine_name so it should be consistent and have the same behavior as using $hostname did before.