Remove some code from resolve.c that was only required for recursive cte references in sub-queries. Also a stray "finish_test" command in pagerfault.test.
Fix some problems to do with WITH clauses and name resolution.