implement __repr__ for WorkerContext and others

as discussed, let's add some safety around `self.provider.name` (e.g. `provider_name = getattr(self.provider, 'name', 'unknown provider')` or similar, and use `{!r}` in in the return value to make sure we don't end up with unicode errors