Make rebaselining not use gigabytes of memory.

The TestExpectations objects we were creating in a loop would consume memory
and never return it. I'm not sure why the memory wasn't getting freed, but reparsing
TestExpectations over and over again is really slow and by far the longest pole
in rebaseline performance. So, fix both issues by not doing this.

Instead, grab all the test_configurations that we want to remove up front and then
remove them all in one go from TestExpectations. This makes the work and memory
cost be O(number of ports) instead of O(number of tests * number of ports).

Also, fix a bug where we would not remove lines for passing tests that were being
rebaselined. I had previously fixed this incorrectly in auto-rebaseline. Instead, fix
it correctly in AbstractParallelRebaselineCommand so that the rebaseline-expectations,
rebaseline-json and rebaseline commands also get the fix.

BUG=379484

Review URL: https://codereview.chromium.org/302003009

git-svn-id: svn://svn.chromium.org/blink/trunk@175250 bbb929c8-8fbe-4397-9dbb-9b2b20218538