[bettermap] flush segments on memory grown and shrink cases.

also, cap the max amount of memory growth so that we can gradually synchronize
the segments.  my experiences showed this approach provided more smooth
behavior (less likely to cause annoying pauses).

this is an update on "noflush" change I made a few days ago.  We still suppress flush in
the destructor, but I found in some cases flush() rather helps.