Facile and time-resolved chemical growth of nanoporous CaxCoO2 thin films for flexible and thermoelectric applications