Add --stderr_lines --stdout_lines to crashmail

This option makes it possible to email the last lines of stder and stdout
when a crash occurs.
Pull out generic functions from crashmail

This is gonna help other event listeners
Add --stderr_lines & --stdout_lines to crashmailbatch and fatalmailbatch