Refactored

jpegrecover2 is shoter, easier to read, and takes into account JPEG
termination byte patterns