C++ generic circular linked list. Requires malloc or equivalent.