Migration script for promotion code

This commit implements the following Migration
1)  Create a "Default CVD"  which has all the content  in the library
2) Publish a "Previous Environments View"
3) For each Non Library env -> change the env's default CVV to point to
the "Previous Environments View"
4) Update every system whose cv is null and make em point to "Previous
Environments"
5) Update every Activation Key whose cv is null and point em to
"Previous Environments View"
6) Change the  Org default view's CVE  to point to Default Publish View
(Org default view's will not point to a CVE after this)
7) Update repo create and clone methods to get the default env path
from CVE as  opposed calculating based on env default view or not ....
8) Auto publish on for Library default views
9) Generate metadata for library views
Ensuring that products/environments are unique

Ensuring that both Product#environments and KTEnvironment#products returns
unique items.
Merge pull request #2335 from parthaa/legacy-promo-migration

Migration script for legacy  promotion code
Merge pull request #2579 from daviddavis/temp/1372797408

Ensuring that product and environments are unique
Moving migration to later date

This is done so as to move it ahead of the last migration in master
Merge branch 'master' into delete-legacy-promotion

Conflicts:
	app/models/repository.rb
	db/schema.rb
	test/fixtures/vcr_cassettes/glue_candlepin_consumer.yml
	test/fixtures/vcr_cassettes/glue_candlepin_owner.yml
	test/fixtures/vcr_cassettes/glue_candlepin_provider.yml
	test/fixtures/vcr_cassettes/glue_pulp_consumer.yml
	test/fixtures/vcr_cassettes/glue_pulp_consumer_group.yml
	test/fixtures/vcr_cassettes/glue_pulp_distribution.yml
	test/fixtures/vcr_cassettes/glue_pulp_errata.yml
	test/fixtures/vcr_cassettes/glue_pulp_hidden_user.yml
	test/fixtures/vcr_cassettes/glue_pulp_package.yml
	test/fixtures/vcr_cassettes/glue_pulp_repo.yml
	test/fixtures/vcr_cassettes/glue_pulp_repo_helper.yml
	test/fixtures/vcr_cassettes/glue_pulp_repo_sync_schedule.yml
	test/fixtures/vcr_cassettes/glue_pulp_repo_sync_status.yml
	test/fixtures/vcr_cassettes/glue_pulp_repo_tasks.yml
	test/fixtures/vcr_cassettes/glue_pulp_repo_units.yml
	test/fixtures/vcr_cassettes/glue_pulp_user.yml
	test/fixtures/vcr_cassettes/pulp_user_exception_raised.yml
	test/fixtures/vcr_cassettes/pulp_user_setup.yml
	test/fixtures/vcr_cassettes/support/candlepin/distributor.yml
	test/fixtures/vcr_cassettes/support/candlepin/distributor_delete.yml
	test/fixtures/vcr_cassettes/support/candlepin/organization.yml
	test/fixtures/vcr_cassettes/support/candlepin/system.yml
	test/fixtures/vcr_cassettes/support/candlepin/system_delete.yml
	test/fixtures/vcr_cassettes/support/consumer.yml
	test/fixtures/vcr_cassettes/support/repository.yml
	test/fixtures/vcr_cassettes/task_support.yml
Fixed some migration script
Merge pull request #2589 from parthaa/master-to-dlp

Master merge to delete legacy promotion