Reduce to N bone weights per vertex (2.5x)

Often needed when creating stuff for games:
Blender 2.5x addon, reduce to N bone weights per vertex and/or normalize, optionally remove too small weights, optionally keeping at least one:

Only works on selected objects; and not just on selected vertices (maybe should remove from toolbar if in edit mode such that user cannot think it operates on selected vertices)