Fixed the almost buffer overflow bug when calling optimize

It turns out that the casting in general causes the problem because there is no
safe way to get from llvm::Pass to pipeline::clips::CLIPSPass. Because of this,
the program will crash in a very strange way as it attempts to access memory
that it shouldn't.

The solution is to cast any CLIPSPassTemplate as a CLIPSModulePass with the
stipulation that it is never called for any other purpose except for
setEnvironment which is provided by CLIPSPass which all CLIPSTemplatePasses
inherit from. An indirect but totally safe way to do things.