Implications of the phase rule for capillary systems containing surfaces and three-phase contact lines with surface and linear constraint relations