Superconductivity and electronic liquid-crystal states in twin-free YBa2Cu3O6+x studied by neutron scattering