Snapshot taking triggered by n transactions and application exit.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>