This PR extracts the non-visitor methods of class InstExecutor into a separate class ExecutorAPI. This reorganization allows library functions (and any future extensions) to reuse the functionality of InstExecutor without introducing cyclic dependencies. See also #185645 and #185817.