SPARK-3874, Provide stable TaskContext API

Could you add the following to the API docs:

```
NOTE: This is not intended to be instantiated or subclassed by user code.
```