Picking improvements

@bagnell you'll want to look at this.

This fixes #349 and #583, which fixes picking ellipsoids and picking primitives with materials with transparent parts.

This also fixes #634, which I wrote when making these changes.

This also improves doc and tests in a few areas, and improves render state usability and brings us closer to z-prepass, shadow, and cubemap passes.  There's some breaking changes deep in the renderer, but nothing worth putting in CHANGES.md.