Refactor log-pusher.py to support daemonization.

* modules/openstack_project/files/logstash/log-pusher.py: The
log-pusher.py script does not cleanly daemonize on its own. Refactor the
script to make it possible for it to daemonize itself.

Change-Id: I974b8370f4dced357beb92ea8e74b1a60cb148b5
Reviewed-on: https://review.openstack.org/28365
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins