db/upgrade.php: Use more recordsets to handle large amounts of equella resources