Use ResqueStatus library for saving worker status

Minor code refactoring for more testable code
Add .editorconfig file
Add some basic tests
More tests and refactoring