Generalizes TemplatePoint and adds class template TemplateWeightedPoint

This pull request generalized ```TemplatePoint``` in the sense that it is now possible to create point classes
from this template with other dimensions than 3. This is used in the TemplateWeightedPoint class to create weighted points for 1d, 2d and 3d case. This pull request is a preparation for the rework of pull request #203.