A quantum delayed-choice experiment enabled by entanglement