Modified the error checks to check for -1 instead of FALSE

This is significantly safer than == FALSE
Modified CLIPSOptimizeCode to have another error check during pass instancing
Rearranged the order of the userfunctions so that the env call is last

I do this because I'm having a really wierd but that almost feels like a buffer
overflow attack, not sure though since I get the same issue when using clang
and g++.
Fixed a bunch of bugs with EnvArgTypeCheck in LLVMFunctions.cpp

It turns out that the check for -1 was the wrong thing to do.
Reverted the change of converting FALSE to -1 in libcore

I change it to == 0 instead