refactor bonjour registration and add http registration.
add support for the dns-sd command-line utility (untested)