Detach dock layout handling from MainWidget instance.

 * Preparation for #64.