Only ignore sigpipe in interactive mode

This allows shell pipes to correctly end redis-cli.

Tested with `redis-cli monitor | head -n20` and redis-benchmark.
Before: It hang.
After: It correctly exits after 20 lines.

Ref #2066