Fixes few issues found with the Lua version of CV_RegisterVar and adds measurements to prevent such things.
CV_RegisterVar