This removes bones which have no actual affect upon presentation. It splits out the faces in question, and supplants them directly under the node that would've driven the removed bone.
I wrapped this up a long time ago but put off trying to formulate an appropriate unit test. I've given up on bothering with the unit test. There's a skeleton there, but the body is not implemented. The "SplitByBoneCount" process probably would've been a good template for a unit test, but it doesn't seem to have a unit test either. So go figure. I think in general requiring unit tests accompany a patch seriously hampers progress. I have other patches in the same straits. Enjoy.
PS: There's a generic mesh splitting routine in here as well. The bone weights process might benefit from sharing it. The inline documentation in the aiPostProcess.h file could probably use some filling out. Will provide a test model if necessary.