iPhone 4 reset is taking a very long time
Doing Reset All Settings on a jailbreak is fine and should be done within a few minutes.

However, doing Erase All Content and Settings on a jailbroken device will never complete and will break everything, usually resulting in a boot loop. There is no 'fix' for running the latter on a jailbroken device and the device will need to be restored in iTunes.

Connect your device to iTunes, then enter DFU (hold power and home until the screen turns off and back on with the Apple logo, then let go of power but keep holding home). Once the device appears in iTunes, restore it.