Prepare statements: add cache for prepared statements

Add a cache so that PREPARE can save the plan.Prepared it creates
for later use by EXECUTE statements. Also implement json.Unmarshal
in some more plan operators.