A graphene–boron nitride lateral heterostructure – a first-principles study of its growth, electronic properties, and chemical topology