Standardise headers

The LICENSE file and metadata.rb indicate the project is covered by the Apache license, but some files carried the header 'All rights reserved - Do not redistribute'.  I have assumed these lines were left over from a template rather than being intentionally proprietary, and have fixed up the headers accordingly.  Hopefully that was correct, if not please accept my apologies.

While I was doing header standardisation it made sense to add notices to the templates too.