Updated octree to r59 and reworked octree example

This only changes files in the examples folder. See also #2148.