Admin.Login v2 API with v1 fallback.

Use fail return value for v1 admin Login.

Use function type instead of interface/struct.

WIP on admin api dispatch, using rpc server properly.

More fixes from jam's review & misc.

Move loggedIn mutex to admin object.
s/APIHandler/apiHandler/
Remove commented out srvRoot, no longer needed to test registry.

Remove ApiFilter.

Move UpgradingRoot to its own file.

Further cleanup and fixes.

Not exposing API types & constructors.
Fix refactored roots to implement rpc.Killer.
Simplify API handler setup in Server.

Add Admin v2 API login request & result.

Added login v2 API.

Explicit JSON format annotations.

LoginResultV2.UserInfo only set for users (not agents).

Better description of login v2 types.

API client using login v2 with v1 fallback.

apiserver.Server defines admin API factories.

Add test suite for admin API version scenarios.

Added ValueOfVersion.

More login v2 test coverage and fixes.

Revert ping interval from some earlier debugging.

Remove commented-out debugging sleep.

upgradingRoot should not be exported.

Decrement login API version numbers. Proper use of rpc ValueOf.

Remove rpcreflect ValueOfVersion, checking anonRoot rootName is "Admin"

Login v0 and v1 share common implementation.

Underlying impl supports v1 login API. v0 wrapper maps the new response
type onto the older API result.

Added unit test coverage of v1 client failure mode on v0 server. Should
fail even for <1.20 server, as the response type does not match.

API client loginV1 errors if server doesn't support facades.

This should take care of the <1.20 case.
Remove unnecessary facade version sort.

Pass through FindMethod errors when in upgrade.

Add client login graceful degradation test case.

failAdminApi is used to test that a login v1 client will degrade to a v0
if it is communicating with a pre-1.20 server that does not know about
API versioning and facades.

Removed redundant comments from admin tests.

Updated machine agent to use LoginRequest instead of Creds.

Fix json struct tags, improve error handling, godoc.

Moved new adminv1 source file per dfc's refactoring.

Continued making changes wrt dfc's apiserver refactor.