Patch 559 : adding of the neuralgas algorithm

Added the code from patch 559, which contains a contribution of the neuralgas algorithm.

Willing to help further fix bugs and stuff, but will definitely need help once problems with the algorithm itself arises. Will link the pull request to the patch on dev forum. (http://code.opencv.org/issues/559)