Add --permissions-key flag.

The --permissions-key flag initializes the PermissionSecret to the
string of bytes in its argument. (refs #2328)
Check GET permissions in the HTTP handler.

Move the check for the permission signature to the HTTP handler, so the
back end can still call GetBlock without having to move permissions all
the way down the stack. Refs #2328
Added permission flags and unit tests.

New flags:
  --enforce-permissions enables permission checking for GET requests.
  --permission-ttl sets the expiration time on signed locators returned
    by PUT.
  --data-manager-token defines a privileged token for the Data Manager
    to issue DELETE and "GET /index" requests.

PUT now responds with a signed locator if a permission key has been
set.

Unit test TestGetHandler tests the GetBlockHandler both when permission
checking is off, and tests signed, unsigned and expired requests when
permission checking is enabled.

Refs #2328
Reset enforce_permissions between tests. (refs #2328)
Require enforce_permissions and API token as necessary.

Unqualified /index requests require enforce_permissions to be enabled
and an API token to be supplied with the request.

SignLocator should return an unsigned locator if no API token was
supplied.

Refs #2328
Split out HTTP handler tests into their own file.

Refs #2328
Added handler_test.go. (refs #2328)
2328: do not expose keys to /bin/ps

For the data manager token and permission key, the command line flags
now specify a file from which to read secrets rather than specifying
them on the command line:

  --data-manager-token-file
  --permission-key-file
2328: simplify tests, permission_ttl variable

Incorporating code review:

Added ExpectStatusCode and ExpectBody to simplify repetitive tests.

permission_ttl is now a time.Duration to reduce confusion about units.
2328: fix TestPutHandler permission_ttl

permission_ttl is normally initialized in main, which is not run from a
unit test.  So a unit test which relies on generating valid permission
signatures must initialize permission_ttl itself.
2328: handler_test.go refactoring

Refactoring to make tests easier to read and understand.
2328: restrict all /index requests to superuser

Per discussion with Tom on IRC: all /index requests, whether they
include a prefix argument or not, should be restricted to the superuser.
2328: incorporate code review comments.

Wrap very long lines to 80 columns.

Describe each test failure more explicitly.

TestIndexHandler: Add /index/prefix tests for unauthenticated and
authenticated non-superusers.

TestGetHandler: initialize all variables in one var block.

main: failure to read permission key or data manager token is now a
fatal error.
2328: more 80-column fixes
2328: code review comments.
Merge branch '2328-keep-permission-flags' (closes #2328)