Fix SEGV on close with TrainTool->Stop()

.. casting the sidebar in TrainView was wrong because the
   controls are in the sidebar, not the trainTool. Thus
   it would crash on exit .. but strangely only on Mac!

.. the code now correctly calls trainTool->Stop(), quite
   why it fails on Mac only is a bit of a mystery.