[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).
Merge pull request #20 from bundy-dns/bettermap

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