Add hostname and hostnamef filters

In most cases, the unqualifed hostname is enough to have a unique
identifier. The full hostnames usually repeat some common suffix/port.
This change adds the semantics of the unix "hostname" and "hostname -f"
commands.

Examples:

    url = "http://foo.bar.baz.example.org:5030/metrics"

    {{ url | hostnamef }} // foo.bar.baz.example.org:5030
    {{ url | hostname }}  // foo