Add access control

The gear server is modified to check an access control list for
certain actions if SSL and ACLs are enabled.  Clients and workers
can be granted permission to register and invoke only functions
matching certain regexes, as well as the ability to grant ACLs to
other connections.  A connection can always revoke its own access.
ACL entries are checked based on the subject name in the SSL
certificate (which is trustworthy because only certificates signed
by the supplied CA are accepted).

The submitJob method is updated to give up sooner if it is unable
to submit a job to any connected servers (older behavior would busy
loop trying to submit it, but since there are now more scenarios
where a functioning gear server might reject a job, that behavior
seems less desirable).

Docs and tests are updated for the new feature.

Change-Id: I07edfb964bf716df08be86f844061bdad29b9728
Merge "Add access control"