Dopants and grain boundary effects in monolayer MoS2: a first-principles study.