Atomically thin p–n junctions with van der Waals heterointerfaces