Ab initio calculations for Ar2+, He2+ and He3+, of interest for the modelling of ionic rare-gas clusters