Adds timeout to wait for puppet tcp port to open

Signed-off-by: Wayne <wayne@puppetlabs.com>
Adds mock method to mock object.

Supports the use of calls to port_open? in bounce_service.

Signed-off-by: Wayne <wayne@puppetlabs.com>
Found curl_with_retries to be more reliable.

Signed-off-by: Wayne <wayne@puppetlabs.com>
Adds 'service-prefix' for per-host service restart

This allows Beaker configs to specify on a per-host basis how to handle init
script/service modifications. For example if
  'service-prefix' => '/etc/init.d/'
then '/etc/init.d/<servicename> restart' would be used to restart puppet on that
host. On the other hand, some other host might have
  'service-prefix' => 'service '
such that 'service <servicename> restart' would be used to restart puppet.

Signed-off-by: Wayne <wayne@puppetlabs.com>
Only wait for port if specified in host config.

This avoids breaking existing tests while also giving folks the option of
modifying the behavior on a per-host basis in the Beaker config.

Signed-off-by: Wayne <wayne@puppetlabs.com>