Fix a bug (light crevasses on the unlit side ot boxed.trinity)

The bug was caused by a peculiar combination of heavy bumpmap and
backface culling. Consider the unlit -X side of the cube. Since
it has bump-map, some of the normals generated can be quite twisted.
And in the phong shader, all of the normals will usually be flipped
by faceforward(). However, some of them will be just enough to cause
strong specular hilights after the flipping. But the side is unlit and
it should be so in the testVisibility() call.

What actually happens is this: the flipped normal N is pointing in the
+X +Y direction. The biased point off the -X side is slightly inside
the cube. We trace a shadow ray from that inside point towards the light.
The ray can only hit the +X and -Z sides, however it doesn't, because
of their "wrong" orientation - backface culling makes them transparent
to the ray.

The fix: add a bit mask (flags) to Ray, and mark shadow rays there.
When a shadow ray is intersected against a Mesh, disable backface
culling entirely.

The flags now are:

RF_SHADOW - the ray is a shadow ray and backface culling is disabled.
RF_DEBUG  - takes the role of the old "bool debug" property of Ray.
Add RF_GLOSSY ray flag; use to fix the hack in the Reflection shader.

In bef15e6c121, a hack was added to prevent a combinatorial explosion
when glossy interreflection occured. It relied simply on that the first
hit should be sampled with full quality, and secondary rays would get
only a few glossiness samples.

This doesn't correlate too well with what's really required. We want
just to avoid heavy sampling on the second and latter glossy surfaces
along the light path; the first glossy surface hit might not be at
depth = 0. So, mark rays that were generated by a glossy reflection
with RF_GLOSSY, and don't bother to sample such rays precisely if
they hit a glossy surface again later in the ray path.

This essentially implements homework 6 - task 2.

Also, add some comments about the ray flags.