src: make snapshot filename configurable

`heapdump.writeSnapshot()` now accepts an optional filename argument.

Fixes #14.