Fix hostname regex pattern

Current hostname_pattern regex complexity grows exponentially
when given a string of just digits, which can be exploited to
cause neutron-server to freeze.

Change-Id: I886c6d883a9cb0acd9908495eec50bf0411d8ba8
Closes-bug: #1378450
(cherry picked from commit ab7ea069de5cecf1c26af50996a26e1a7f86def4)