Adds a C API for RewritePatternSet, PDLPatternModule and the Greedy Pattern Rewrite Driver, based on the implementation found in Beaver.
This would allow developers to write passes in PDLL, compile them to PDL MLIR modules and use them to write passes in C or languages with C bindings. I'm exploring the possiblity of using Rust to write MLIR passes, which has led me to create this revision.
I'm not sure if we should add a way to pass a GreedyRewriteConfig, since the proposed API in this revision does not allow you to configure the rewrite driver.
Would it be useful to extend the C API further in the future to support dialect conversion, or even custom RewritePatterns and PatternRewriters similar to the ExternalPass API?