Seriously, do not worry about backgrounded or paused apps consuming RAM. This isn't Windows 95 we are dealing with here, Android is perfectly capable of managing RAM, and in order to maximise the efficiency of the system Android will aim for high RAM usage: it will keep recently and frequently used apps in RAM to save both time and power when you next switch to them. Anyone telling you it is good to have a lot of free RAM in Android does not know what they are talking about, and any app that claims to help you achieve this state should be removed.
Now if you see apps consuming significant cpu cycles in the background that's different, because that's abnormal behaviour. Though if they need to listen for messages or similar then they will need some service running to do that, so consider what the app is doing before you decide it is wrong.
However, this is different from your original post, which said that you had constant errors, which I took to be because you'd modded it to the point where it was unstable and wanted to return to stock. If your problem is in fact that you have misbehaving apps I don't see how returning to stock will solve it (unless the apps that are misbehaving rely on root access, in which case they'll stop working - but you could rescind their root access if you wanted to anyway). A stock phone has fewer ways to control apps than a rooted one, and if an app is misbehaving I would always look at the app rather than the OS.
Anyway, if you want to return to stock (as your first post said) you'll need to flash stock firmware. You'll need to ask a Samsung expert whether this will erase your apps and data or not, but I'd anyway not do it without making backups first (and remember that recovery backups or Titanium backups won't work when the phone is returned to stock). Most manufacturers' system flashing tools reset the phone as well (so wipe everything), though with some there are ways of doing it without a reset. I've never done it with a Samsung, so can't tell you about them.
If you are using a custom ROM you can flash the same ROM over it without wiping first. That will only make a difference if you have messed-up something in the ROM though. If you try to flash a different custom ROM, or a stock ROM when you were previously custom, then doing a wipe (i.e. a reset) first is strongly recommended. If the ROM is sufficiently similar to the current one it might work without, but if it's very different (different base OS, AOSP vs TouchWiz, or just a sufficiently different set of mods made to the base) it probably won't boot without a reset, or may suffer more subtle errors in use.