[FINAL] Added optional LUA callback at the beginning of a render cycle.

This is needed for some group hierarchy optimizations in LUA land.