The structural phase diagram and oxygen equilibrium partial pressure of YBa2Cu3O6+x studied by neutron powder diffraction and gas volumetry