2-Semilattices: Residual Properties and Applications to the Constraint Satisfaction Problem