enable passing a :hostname to the handler

In the event that some custom logic for setting a hostname is desired,
use the hostname passed in the configuration.

If the user has specified :use_ec2_instance_id in their configuration,
this will not be applied, as the existence of :hostname in the config
will override any other decisions.

Fixes #41