Use simple pattern in list_file_store_content

to match hidden directories insted of using the
complex File::FNM_DOTMATCH.
Create a SystemDescriptionFactory module for the RSpec tests

The module is available in all specs and allows to easily create
SystemDescriptions either in-memory or in a temporary
SystemDescriptionStore on disk. It also allows for
storing raw descriptions which aren't compatible with the code anymore.

Example for creating a simple description in-memory:

  create_test_description(json: "{}", name: "name1")

More complex example that uses the temporary store:

  describe Foo
    initialize_system_description_factory_store

    it "does something to the description" do
      description = create_test_description(
        store_on_disk: true,
        json: test_json
      )
    end
  end
Extract the JSON loading into a separate method

That will be relevant in the following commits regarding the migrations,
where we want to have the raw JSON instead of a full description.
Implement the Migration base class

The Migration class is the base for all migrations. It implements a
"#migrate_description" method which takes a system description name and
applies all relevant migrations on it.
Lazily load migrations from schema/migrations when needed
Require migrations to describe their purpose

Migrations have to describe their own purpose using the "desc" class
method, e.g.

  class Migrate1To2 < Migration
    desc <<-EOT
      Add 'foo' element to the system description root.
    EOT

    def migrate
      @description.foo = true
    end
  end

Migrations which didn't call "desc" will trigger a MigrationError when
they are called.
Implement "machinery upgrade-format" command

This command allows for upgrading the format version of a specific
description or all descriptions at once.
Fix integration tests

This place was forgotten while adapting the tests to the new system
description factory.
Add unit test for unmanaged files validation

Add unit test to check additional file validation of unmanaged
files inspector.
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"
Encapsulate all output into Machinery::Ui.puts and Machinery::Ui.warn

Before some output was done using the Machinery::Ui class (paged output,
some warnings) and other output was done using the STDOUT.puts and
STDERR.puts methods. This commit now streamlines all machinery output so
that everything is routed through Machinery::UI. That makes everything
clearer and has the additional benefit that the machinery output can be
easily stubbed in the tests without affecting non-machinery output.
Create method Ui.error analogue to Ui.puts and Ui.warn.

When creating the Ui.puts method we also replaced some put calls to stderr
with Ui.warn. This however is wrong for cases where stderr receives an
actual error and not a warning. These errors are now handled by Ui.error
in the same way that other STDOUT and STDERR output is handled by Ui.puts
and Ui.error.
Do not have the Ui.warn method always prefix its output with "Warning".

Not all Warnings need the "Warning" string prefixed, so we do not do this in
the Ui method generically.
error -> warning
Merge branch 'review_140917_remove_global_puts_stub' of github.com:SUSE/machinery into review_140917_remove_global_puts_stub

Conflicts:
	lib/build_task.rb