Improve limit enforcement for jobs

Set RLIMIT_RSS, RLIMIT_AS and/or RLIMIT_DATA to enforce memory limit.
See bug 454 for details