Split tutorial to c++ classes.

This code does not compile because freeglut requires global/static
functions for callbacks.