Add intial impementation of some Repair modes. C only.

Basically copy-paste them from dither.
Add modes 5-10 to Repair
Remove modes 19-24 as it doesn't seem possible to find the source for those