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

Added "optimize" as a new stage to the compilation.
Merge branch 'issues-daniele'