[CDAP-869] Refactored batch instances REST API handler