Drake function

This implements the "DrakeFunction" idea we'd discussed in #269. I'd like to get feedback about any and all aspects of it, so please, let me know what you think!

This could (probably) be merged in as is without breaking things - everything is contained in the `drakeFunction` package. The only exception is that I had to add the drake root folder to the path in `addpath_drake` in order to get `drakeFunction` on the path.

The property `is_weighted` is to speed up the computation? I feel either we should use the same formula to compute the norm whether it is weighted or not, or we should derive a `WeightedNormSquared` class from `NormSquared`. Since otherwise when we use this `NormSquared` class inside other functions, we will then always consider to implement two cases, one for `is_weighted=false`, the other for `is_weighted=true`