added hostname lookup for cacti

query hostname will now resolve the hosts

moved environment setting for name lookup to the class