update license to apache license.

some examples are already under the apache license, so makes sense to use it for all of them.