Specify dependencies in setup.py
Beanstalkd 1.4.6 doesn't always show cmd-delete values
Always explicitely close the beanstalk connection

By reworking how to select the command, doing this actually makes the
code more readable too.