Added a non-recursive version of the C++ test and a compile-time template meta-programming version for fun.

Note the compile-time one needs the index of the item to find at compile-time.

The non-recursive C++ version is now far faster. Perhaps the Java version
would also get faster if the recursive structure was removed.