Gaussian core model in two dimensions. II. Solid and fluid phase topological distribution functions