Accumulators with insertion or intercalation of metals other than lithium, e.g. with magnesium or aluminium