Add license information (Apache 2.0). Fix several issues discovered in oauth2-avro-d2-example.