Improve API

- Rename privateContext to backgroundContext.
- Add performInBackgroundContext to provide a safe saving block.