Moving delegate to separate module so it can be exported; Fixes #35

I was considering using `require.main.filename` which works in forever and a few others, but to get it to work in pm2 is tricky. Instead, I opted to just move the delegate lifecycle functions to their own file. 

This way it's clearer on the intended use of the file: `index.js` runs the app` and  `delegate.js` exports the lifecycle functions.