Constraining spacetime torsion with the Moon and Mercury