Add additional commands to the admin client.

Added the following methods to the GearmanAdminClient class
  1. get_jobs methods is equivalent to gearadmin's '--show-jobs'
  2. get_unique_jobs method is equivalent to gearadmin's '--show-unique-jobs'
  3. get_pid methos is equivalent to gearadmin's '--getpid'
  4. cancel_job method is equivalent to gearadmin's '--cancel-job'

The get_jobs, get_unique_jobs and cancel_job protocols has not been
released yet.  These protocols are in 1.2 branch commited in
milestone: https://launchpad.net/gearmand/+milestone/1.1.6
Import JOB_UNKNOWN at top-level.
Add SSL support.

This adds support for SSL connections to an SSL enabled job server.
To use SSL, three SSL-related files must be given when defining a
job server connection:

  keyfile - File with the private key
  certfile - File with the public key
  ca_certs - File with the CA public cert(s)

GearmanConnectionManager has been modified to simultaneously
support non-SSL and SSL connections alike. Nothing changes for
non-SSL connections:

  GearmanClient(['localhost:4730'])

SSL connections require that the host list use a dictionary to
define the connection:

  s1 = { 'host': 'localhost',
         'port': 4730,
         'keyfile': '/path/to/keyfile',
         'certfile': '/path/to/certfile',
         'ca_certs': '/path/to/ca_certs' }
  GearmanClient([s1])

Currently, all three SSL related files MUST be given and the port
must be specified in the dictionary.
Merge pull request #41 from Shrews/master

Import JOB_UNKNOWN constant.
Merge pull request #43 from Shrews/ssl_support

Add SSL support.
Require cert validation of server.
Merge pull request #45 from Shrews/ssl_fix

Require cert validation of server.
Handle SSL WANT_READ/WANT_WRITE exceptions and drain SSL buffer.

SSL has in internal read buffer that needs to be drained. Since
we, by default, read in 4K chunks, anything larger would have left
data to be read that may not have been processed properly.

Also, we need to handle SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE
exceptions around the recv() and send() calls, otherwise we would
think we are disconnected and cause all sorts of problems.
Do not attempt to register connections not yet established

When using multiple job servers, some connections may not yet be
established (not been chosen yet), so their socket is still invalid.
This would cause poller.register() to throw an exception.
Merge pull request #46 from Shrews/fix_ssl_recv

Address some SSL handling issues.
Catch WANT_READ and WANT_WRITE SSL exceptions

SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE could possibly be
thrown from either recv() or send(), so we need to make sure both
are handled.
Don't remove entries from handle_to_request_map.
Since it's a WeakValueDict, no memory leak will be caused by not
removing entries, and in some cases entries are used even after
COMPLETE messages.

Fixes https://github.com/Yelp/python-gearman/issues/13
Merge pull request #55 from noamraph/master

Don't remove entries from handle_to_request_map.
Merge pull request #54 from Shrews/ssl_exc_fix

Catch WANT_READ and WANT_WRITE SSL exceptions
Merge pull request #34 from zaro0508/update-admin-client

Add additional commands to the admin client.
comment out^Cest failed due to pull #55
Merge branch 'master' of https://github.com/Yelp/python-gearman
remove more tests due to pull #55
Add support for SUBMIT_JOB_EPOCH

* submit_job now accepts a 'when_to_run' parameter to take advantage of
  Gearman's ability to schedule jobs to be run in the future