Add a util::SyncTask helper.

I mean to add tests for this, but it's pretty simple, I've built the other thing on top of it, and it seems to work, so I don't expect the implementation to change...