Detection-Loophole-Free Test of Quantum Nonlocality, and Applications