Added new method for constructing functions of multicolvars

Also fixed bug in KernelFunctions