Duality Invariance of Cosmological Solutions with Torsion