Adds a debug-dump-facts command for dumping the facts.

Facts can be dumped from factsets or snapshots, and
can be filtered by attribute and/or entity.

See #405.

/cc @charleso @nhibberd @domdere @raronson 
Naive assumption that more common situation is the set isn't empty so greater chance of short-circuit. Don't know that there is a massive win either way. Will change if you think it will make a difference.