Closing the Locality and Detection Loopholes in Multiparticle Entanglement Self-Testing.