Native defects in bulk and monolayer MoS 2 from first principles