The controlling nanoscale phase separation near a quantum critical point in high Tc superconductors