Export Google-internal library

Exporting the Google-internal CAP library as submitted at HEAD. Also, fixing the CAP validator to be compatible with it.

The new CAP library has a bunch of new features, bug fixes and validation heuristics. More details to follow in the notes of the upcoming release.
Yes, the problem is with the validator. I'll try reverting this change to see whether I can get the project to compile.
I will update this thread.