Added demo for multidim dmp
Better bookkeeping during optimization. Better saving of learning curves.