Collaborative learning of joint medical image segmentation tasks from heterogeneous and weakly-annotated data