lib: refactor vars using let and const
Changed all var to let and const for lib root files. will continue with internal folder in another PR
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines