Google has struck a deal to purchase a major solar project's entire electrical output to offset its fossil fuel emissions.