Start to convert test_rnd1 to C++

Also delete m4 macros