Reorganize tests (only one function)

Previously, we had two tests per node type: One to test double
conversion (Node → JNode → Node), one to test compilation (String →
Node). There’s a helper function for each of these: testConversion,
which takes nodes, and testCompilation, which takes entries from String
to Node.
However, I alway ended up using the same samples for both, so now we
have an additional helper function doTest which calls testConversion and
testCompilation, and use that for all the tests.

(Also removes a few unused imports.)
source-gen: Update for backend tests change (9f55615)
copy() should set extraInfo
source-gen: Update for copy change (7f280fc)