Added functions to generate random rays

+ADD: Functions to write rays and intersections to PLY
~CHANGE: testPly() now is parameterizable with max depth of kd tree and
 the amount of rays to be generated