Fix Ip{Address,Prefix}Builder performance

Using String.matches() incurs major overhead of almost 4ms. Precompile
the pattern and be smart about the use of it. At the same time do a
small optimization to HostBuilder in the form of not instantiating
multiple matchers.

Change-Id: Ifc7f5ff90e71c545acc00275d84780cebe02ec1c
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "Fix Ip{Address,Prefix}Builder performance"