More explicit return codes and other pyfarm-agent fixes

This merge:

* Closes #64 by adding more explicit handling for return codes from the command line tool `pyfarm-agent` which was missing before.
* Closes #63 by refactoring some older code which required the host to contact
* Closes #62 by refactoring some older code which required --master at all times

**PS**: Sorry for the misnamed branch.  I ended up adding the additional changes to this branch since they would have resulted in merge conflicts in separate branches.