Two-dimensional MX Dirac materials and quantum spin Hall insulators with tunable electronic and topological properties