Update LSM merge stats more regularly during large merges.

Also only check for shutdown once every thousand inserts during a merge,
rather than 999 times in a thousand.