Add API func ShareEnvironment to client and server API:

ShareEnvironment shares the current environment with the given user.
Under the hood, it adds an environment user to state.
Remove unneeded removes
Added comment
Update the doc for backups and restore.
Clarify about the upload-and-restore case.
a -> is.
Explicitly indicate that root.tar does not include mongo-related files.
Clarify the role of --download and --upload.
Drop an unnecessary comment.
Add Restore Mode to stop api calls while restoring

The main goal of this PR is to prevent data loss
during the different steps of the restore process.
This will be used by restore once it lands.
This is the basic required functionality for this
API server mode.
Following a feaure implemented for Upgrade, an
api root server that can selectively allow API
commands depending on the Restore step we are
running.
When we are preparing a restore: that includes
uploading files if required for instance, the
API will only accept Client.Restore to be
triggered in order to avoid data loss when the
restore runs.
When Restore is running no calls will be allowed
since state server will be down.
When bootstrapping fails, jenv files are now cleaned up.
Fixes LP: #1365144 bug.

Signed-off-by: Jorge Niedbalski R <niedbalski@gmail.com>
ActionFinish in the API
address @fwereade's comments
line-wrap struct initialization
authentication refactor
simplify api results structs
helper isErrPerm
add authentication test
fix return type

Interestingly, the RPC call was perfectly happy filling the
params.BoolResults with the apiserver return of type params.ErrorResults

I expect that is because params.ErrorResults has the same Results field
with []params.ErrorResult instead of []params.BoolResult, and the only
difference between ErrorResult and BoolResult is that BoolResult has an
additional field for boolean results, and the apiserver code only
populated the Error field which was common between the two.