Add clear() to RelOptPlanner. PlannerImpl.transform() call clear().

Hi Julian,

This is the code I modified in my local branch, which will clear the internal status of RelOptPlanner in the PlannerImpl.transform(). 

The reason for adding clear() is because we want to call transform() multiple times, and RelOptPlanner would hit problem during the second call of transform(), because it still has the status from the first call of transform(). 

Please take a look and see if this is the right fix to address the issue.  Thanks!