Add test of dynamic code alloc based on (min,max) code lengths

- To enable the test, please set TEST_CODE_RANGE to 1 in Configure.cpp