Rewrite EXPLAIN to a VALUES query

This helps avoid bytecode generation failures when plan string is too large due
to max constant pool size being exceeded.