Store "extracted" state in config- and changed-managed-files scope

Until now we had to check for the presence of the according directory in
the system description in order to tell if a scope was extracted or not.
This is now simplified and made more explicit by storing the "extracted"
state directly in the json.
Also add extracted flag to unmanaged-files scope
Bump format version

The new version 2 adds "extracted" flags to the config_files,
changed_managed_files and unmanaged_files scopes.
Write format migration from version 1 to version 2
Generate pretty JSON when upgrading system descriptions
Add integration test for "machinery upgrade-format"