[Continued from D11827; sans 'writeonce' annotations.]
Almost done, modulo test cases and minor cleanups/generalizations.
I expect to have this ready to submit for review upstream tomorrow,
along with the updated design doc, sometime tomorrow (and definitely by the end of this week).
Please let me know if you see any red flag so far?