Resync with current master of official Psychtoolbox-3 repo.

* Attach thread input fixes via pull from "simonster".
* Improvements and refactoring to radiometric / color routines by David.