Magnetic and structural properties of molecular films, blends and nanostructures based on cobalt phthalocyanines