Structure and stability of the Si(331)-(12×1) surface reconstruction investigated with first-principles density functional theory