Add methods to get optimized plan from LocalExecutor

After reading @sscdotopen's comment in #128, I figured it might be worthwhile to add the option to get the optimized plan from the `LocalExecutor`.

This commit adds a static and non-static method which return the optimized plan as a String (in JSON). The static method is for the case where you just want the optimized plan (start executor, get plan, stop executor) and the non-static method for the general case where you start the executor yourself and probably also run the job afterwards (thanks to @rmetzger for pointing out that this case is also important). 

Different names for basically the same thing kinda suck but I didn't have a better idea right now... open for changes. :)

(We could also add the `PrintWriter`/`FileWriter` versions from the dump generator, but the String version should be fine for now.)