track functions used

track global functions used so we can emit less code
change table stuff again so g++ and clang++ can compile 3D luts in a
reasonable amount of time