param_limit: re-write completely to make it simpler
I was trying to debug something and I realized that I totally can't
understand how this works. So I re-wrote it.
The original does a backward thing were it marks some strees and then
figures out everything at the end. It should just be setting states and
letting the core figure out the stree stuff.
It turned out the bug was not related to this so I'm not positive that it
fixes anything but I've been running this code for a few weeks and it
doesn't seem to break anything either. So I'm going to commit it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>