Clarify what licences apply where

This doesn't change any license, just clarifies what's licensed under
LGPL and what's under GPL.
testsuite: add tests for array implementation