Spin and thermal conductivity of quantum spin chains and ladders