Long denied access to foreign technology because of sanctions, Iran has nevertheless learned how to make virtually every bolt and switch in a nuclear weapon, according to assessments by U.N. nuclear officials in internal documents, as well as Western and Middle Eastern intelligence analysts and weapons experts.