Raise a DalliError if the hostname cannot be parsed

If a hostname was provided that did not match the regex in
`parse_hostname` then using the `res` variable would cause a
NoMethodError with the message "undefined method '[]' for
nil:NilClass". It was a bit vague so this commit will make the
failure more explicit.