Factor out OptionalQueryGraphCardinalityModel
Support disconnected pattern nodes