Introduce overridable pre- post- hooks for stdout

Following a proposed changes from
https://github.com/pyfarm/pyfarm-agent/commit/d9502780b8f4542a35e8acfc069800e11f5f82bb#commitcomment-6321540
Split stdout of child process into lines
Merge pull request #52 from guidow/stdout_line_splitting

Stdout line splitting
adding handling for Ctrl+c events so retries won't retry forever (fixes #24)
Merge pull request #56 from pyfarm/better_shutdown_behavior

adding handling for Ctrl+c events so retries won't retry forever
merging master