Change TaskContext to abstract class

Details

Description

PIG-3860 introduced the generic TaskContext for different execution modes. One suggestion from Rohini is to change TaskContext to an abstract class so that we can avoid instanceof calls and putting it in shims layer.