Stability and dopability of native defects and group-V and -VII impurities in single-layer MoS2