Optimal Public Investment and Dispersion Policy in a System of Open Cities