Patch Set 12:

Huzzah!  Thanks for helping to get this pushed through (and thanks especially to Shawn, for going back and forth about a hundred times with me on the algorithmic details.)  Hopefully folks will find this useful.