veyron/services/identity: Refactoring to allow identityd_test to be run
in a module.

Four refactorings are included in this CL:

1) A server.Listen() function has been created, which starts the veyron
blesser service and http listener, and does not block.  Server.Serve()
calls server.Listen(), and contains the cleanup and blocking logic.

2) profiles/static.go is imported in main.go, and the static.ListenSpec
is threaded through the calls to Serve and Listen.  We shouldn't be
importing a profile in non-main packages.  This was causing the module
to panic.

3) One  utility functions (writeKeyAndCert) needed by identitd_test has
been moved out of main so that it can be used from the module without
needing to duplicate the code.

4) The flag definitons have been moved out of server.go and into
main.go.  The flag values are passed into server.Serve().

Change-Id: I641ea91bdbd1afdb47ea171650b4af4c2254a197
4 files changed
tree: b306c5a63820bf78a225c205daf00af2b2405e0e
  1. lib/
  2. profiles/
  3. runtimes/
  4. security/
  5. services/
  6. tools/