Convert to Apache License v2.0

Converted from GNU Affero GPL license to the Apache license. Also added
license file to all sources.