Revert "Update HOSTNAME in grok-patterns"

This reverts commit a17f72150d347ce53521aa709f45fea818c3385f.
This change caused a syntax error in the HOSTNAME pattern I believe.
- move ShutdownSignal to errors.rb
separate server/client modes to separate methods; use ShutdownSignal to identify termination
- fix tcp input tests