[SPARK-57760][SS] Make small optimizations to StatefulProcessorApiClient