*: support purging old wal/snap files
Merge pull request #1810 from xiang90/purge

*: support purging old wal/snap files