Add JSON schema validation for "packages" scope

Squashed version of #133.