Identifying the stacking style, intrinsic bandgap and magnetism of pristine graphdyine