simple optimizations for bvhtree_from_mesh_faces() for editmesh, was quite inefficient (unneeded loops, not breaking out of face loop early). 
also correct own oversight - use TRANSFORM_DIST_MAX_RAY rather then when checking for max value in snapDerivedMesh. 


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56256 954f8c5b-7b00-dc11-b283-0030488c597c