Add table truncate feature

review by @szeiger

This needs to be reopened against master after action-monad was merged. Just opening this now to allow review.