services/mgmt/device: further restrict devicemanager 'test mode' & extra logging

In addition to setting the local mounttable port to be auto-assigned, we also
need to set the device server's port the same way (to avoid port
collisions). The proxy we can just disable in test mode. Further restrictions include:
- disabling logging to the log dir in test mode (to avoid interference with the
  main device manager's logs, and in particular not mess up what deviced.INFO
  points to)
- disable neighborhood advertising
- skip attempting to set up the claimable service to avoid error log spam

I'm also adding extra logging around the shutdown flow, to help debug hanging
during Update (I once saw a successful Update RPC, but the device manager didn't
actually restart, presumably hung on a shutdown step).

Change-Id: Ibc7361f39758277d63bdfe06c7e4f39175600918
diff --git a/lib/appcycle/appcycle.go b/lib/appcycle/appcycle.go
index 2ae5af4..9afe008 100644
--- a/lib/appcycle/appcycle.go
+++ b/lib/appcycle/appcycle.go
@@ -45,6 +45,8 @@
 }
 
 func (m *AppCycle) stop(msg string) {
+	vlog.Infof("stop(%v)", msg)
+	defer vlog.Infof("stop(%v) done", msg)
 	m.RLock()
 	defer m.RUnlock()
 	if len(m.waiters) == 0 {