veyron/tools/mgmt/device: refactor code into packages

Avoid keeping the implementation in the same package as the main and the tests.
Instead, make a new impl package where the implementation of the commands goes.
The test files go in the same directory, but with package name impl_test (to
avoid leaking state into the production code).  The main package only contains
main.go. Besides a cleaner code arrangement and better boundaries between test
and prod code, this will allow us to configure context and profiles differently
(which I'll need in a subsequent cl).

Refactor common test code into util_test.go, and root command creation (as well
as global context management) into root.go.

Change-Id: Ib71846b3cdf1e49608406208d676c23b70d8b0ab
13 files changed
tree: 5519538b4d87fe8e26d91e0e870d76c9d5a7103e
  1. lib/
  2. profiles/
  3. runtimes/
  4. security/
  5. services/
  6. tools/