Add API support for truncating collections.

See #107
Add UI support for emptying collections.

Fixes #107