Dyons and S-duality in N = 4 supersymmetric gauge theory