Finding Fixpoints in Finite Function Spaces Using Neededness Analysis and Chaotic IterationSome Global Compile-Time Optimizations for CLP(R