Made cron startup more robust

- More safely and platform-agnostically check pid
- Fail gracefully when IMAP fails
- Fail gracefully when MySQL fails
Merge pull request #5 from worr/cron_failures

Made cron startup more robust