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

Hi Julian,

This is the code we modified in optiq, to address the issue when developing code in Apache Drill. Specifically, when Drill wants to call planner.transform() multiple times, each with different rulesets and different conventions, optiq might throw CanNotPlanException during the second call, because it still has the status from the first call of transform().  

I added a unit test case in PlannerTest:testPlanTransformWithDiffRulesetAndConvention(). This testcase will fail with CanNotPlanException, if we comment out the line of planner.clear() in PlannerImpl.transform() method.  

Please take a look and see if there is any problem in the fix. Thanks a lot! 

BTW: Originally, the issue was reported in issue #162. But it was accidentally closed, because I deleted my local branch.