Add a progress context manager

This is used to rate-limit progress update writes to the database
and provide convenient semantics for callers to easily manage
progress.