fix to flush a buffer by USR1 signal even on error happening

Continued from https://github.com/fluent/fluentd/pull/468