Implementing link based server side sorting is not that hard. I’ve done it several times using the codebase in the EQdkp product. Client side sorting is a bit more complex and intensive trying to make it work on multiple browsers and slow computers.
As for recovering image numbers, it’s not a complex task, but does require some SQL queries. There is a very helpful and well-written forum thread about purging unwanted images and renumbering them based on whatever needs you want.
It involves getting the existing imageid, setting it to the new value, and then updating all hosts that had the old value with the new value. Easily doable from phpmyadmin or the command line, if you know basic SQL.
There is no easy way through the FOG UI to update the image numbers, but in FOG 0.33, I think we’ll be able to make custom pages and that’s one I’d gladly contribute to the FOG community.