realloc , SParticles light structure for kdtree and modulo optimisation

-Some memory realloc is not call at each iteration
-A copy of lighter particle struct is created for kdtree
-Modulo is replaced by a precalculated int array