p2p-server: check return value of ServicePublisher::Construct()

This factory can return NULL if failing to initialize Avahi. Detect
this and exit with an error code instead of segfaulting down the road.

TEST=Unit tests pass.

Change-Id: I8ef5d422f8effb4b020bcbb374d6666c0eac5e27
Reviewed-on: https://chromium-review.googlesource.com/168641
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
1 file changed