Torsion in the matching complex and chessboard complex