Made runJobs.php respect time limits better and try to bail before OOMs

Change-Id: I93b9cebda591f15d42c401f4dc51ecd746d45a0d
Merge "Made runJobs.php respect time limits better and try to bail before OOMs"