Three-cluster description of properties of light neutron- and proton-rich nuclei in the framework of the algebraic version of the resonating group method