Systematic comparison of semi-supervised and self-supervised learning for medical image classification