I added a template function square to utility.h which computes the
square of any object. In order to make sure it gets tested I cleaned
up the implementation of DistanceRestraint and made it use the square
function.
Since python has the ** operator already, I don't see any reason to
export this function to python at the moment.