Add AGPLv3 license and a copyright notice to every single file

This PR adds AGPLv3 license to the project and, as recommended by the license, adds a copyright notice at the beginning of each source file.

### Before merging

Make sure that there haven't been any new files added to `master` branch after this PR was created or last updated (i.e. files that would not have the copyright notice after this PR is merged).

### After merging

Everyone who is reviewing PRs should make sure that any new files have a proper copyright notice at the beginning of the file.