Limit generated hostnames to 32 characters.

While the DNS spec limits components to 63 chars each, some
containers we've tried to start fail even on fewer.  So to
be paranoid, we limit it to 32.  In order to hopefully do
distinguishable, meaningful and significant truncation, we
take the first 16 chars and the last 16.
Merge pull request #172 from spotify/drewc/hostname-too-long

Limit generated hostnames to 32 characters.