Rewrite EXPLAIN to a VALUES query

This helps avoid issues when the plan string is large, which causes the
bytecode compiler to fail due to max constant pool size being exceeded.