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
4 files changed