license: Added licenses, CAAs, and updated COPYING
legal: Movde licences and CAAs to separate directories
license: Added licenses to legal/licenses, swapped out getopt_long()

Windows builds require a getopt_long() implementations, and the
implementation had been the (undesirable) BSD 4-clause. This has been
replaced with a BSD 2-clause licensed implementation.
common: Fix broken Windows build

getopt_long() required for lib tests.
license: BSD and MIT licenses moved
license: Added file headers