add flush_at_shutdown option to buf_memory
Merge pull request #286 from sonots/flush_at_shutdown

add flush_at_shutdown option to buf_memory