fix the valrgind failure on master. This will conflicts with Paul's chan...

...geset.
I think you are right. Cast from const to non-const is necessary, but vice-verse is automatically. 

Anyway, Paul will remove the destructor from the plan node and use boost scoped_ptr instead. So this temporary change will be merged to fix master failure. 

Thanks for your reviewing.