branch fron 2.5 for jaguarandi
Merge from trunk
svn merge -r 19848:20018 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender

*new generic raytrace API
*Adapted octree to a more generic raytrace API
*ray shadow works (other untested stuff disabled atm)

On the scene tested the user-cpu time got from 1:24 to 1:19/20
probably because of removed callbacks or sligtly diferente memory usage
svn merge -r 20018:20133 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender
Added neighbour test on detected ray hit
Renamed exported functions from render to have the RE_ prefix
RayObject_* => RE_rayobject_*
I think this fix the black dots problem
(ZanQdo machine is just faster than mine.. so he will test :) )
svn merge -r 20133:20486 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender

2.5 trunk has a nice bug fix for rendering
Fixed black dot bug! (it does work for the test case I had)
But I still wonder about its correction because it looks the
oposite of whats documented and of what was used before :S

I also took a long time to find it because I tought blender was feeding the raytrace structure
with quads and triangles but it looks the quads get triangulated before reaching makeraytree (on rayshade.c).
Linked bvhkdop with raytrace api
*Some debug
*Some more integration with bli bvh (just testing stuff)
RayObject to support instances..
its not still plugged in the renderer, as so, it hasn't been tested yet
*enabled mirror rays again
	*octree is fine
	*bvh tree gives bad results
Fixed reflections on bvh tree
 (its kinda of a hackish-fix.. must be improved later)
svn merge -r 20486:20651 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender
*Instance support at dupliverts/faces
*Octree works nicely on hierarchic trees
	*the old code was quite destructive at the Isect variable
	 changing isec->start, end, vec..now it only changes isec->labda (and hit results)

Currently rendering a BVH of all objects, where each object has it own octree.
*ray<->bb hit optimization... just to make it "slightly" faster :P

Based on Tactical Optimization of Ray/Box Intersection, by Graham Fyffe
[http://tog.acm.org/resources/RTNews/html/rtnv21n1.html#art9]

*for now it breaks shrinkwrap or other stuff that relies on sphere-raycast of BLI_kdopbvh.
svn merge -r 20651:20822 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender
Enabled the missing features (not tested)
bug-reports are welcome
Non recursive tree transverse on raycast
	*for now proximity-heuristic on tree transverse is disabled