CodeGen: refactor unit tests using parameterized tests
CodeGen doesn't do anything fancy like fork() or ptrace(), so it's
safe to test using just plain gtest. That also allows us to convert
the tests to use parameterized tests, so we can easily run each test
independently.
While here, also invert the structure a bit because I expect once I
rewrite and simplify CodeGen, a lot of the ProgramTestFuncs to go
away.
Lastly, for simplicity I'm leaving a lot of statements as ASSERT_TRUE
even if they could use ASSERT_EQ, etc. Again, I'm expecting some of
those to go away, so I'll worry about cleaning them up once the
unneeded asserts are gone.
BUG=414363
Review URL: https://codereview.chromium.org/
687813003
Cr-Commit-Position: refs/heads/master@{#302482}