Fixed issue https://github.com/frenetic-lang/pyretic/issues/28

Added "optimize" as a new stage to the compilation.