Change license to MPL 2.0

Also, added a dist-hook in Makefile.am to add copyright header to every source
file.