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

But then its already static code ? + Where else should I put it ? I