[SPARK-3543] Write TaskContext in Java and expose it through a static accessor.

u don't need to wrap this, do u?