Nanostructured calcium cobalt oxide Ca3Co4O9 as thermoelectric material. Effect of nanostructure on local coordination, Co charge state and thermoelectric properties