Small Refactor in process_job function
Only set snapshot jobs to DONE if retention has been processed

Fixes issue 264
Get next job based on updated_at timestamp.
Minor refactor in snapshot worker
Merge pull request #265 from ameade/change-process-job

Only set snapshot jobs to DONE if retention has been processed
Merge pull request #267 from esheffield/get-job-by-updated

Get next job based on updated_at timestamp.
Add expected update_job mox call to allow test to pass.
Merge pull request #269 from rackerlabs/unittest-mox-fix

Add expected update_job mox call to allow test to pass.
Fix broken unit test.
Merge pull request #270 from esheffield/fix_unit_test

Fix broken unit test.
Reverts the previous fix to unit test

Two fixes were merged to fix rm3453. This commit reverts one of those.
Merge pull request #271 from rackerlabs/rm3453

Reverts the previous fix to unit test
Consistently use '_' for created_by metadata on images
implement sql migration support for QonoS

- initialize a new migration repository, 'migrate_repo'
- add version scripts to create tables as declared in models.py
- introduce CLI, 'qonos-manage' to run migration commands like,
  version_control, db_version, db_sync, downgrade & upgrade
- make 'qonos-api' db initialization to add the database to the
  migration repository for version control
- implement tests for testing the migration & changeset scripts.
- add 'sqlalchemy-migrate' dependancy to the pip-requires
- introduce MANIFEST.in for including migration config files as part
of the distribution package.
Merge pull request #273 from venkateshsampath/impl_sql_migration_support

implement sql migration support for QonoS
Uses unittest2 module

skipTest functionality provided in py27 and py3 can be used in py26
using this unittest2 module.
Merge pull request #275 from komawar/use-unittest2

Uses unittest2 module
Merge pull request #274 from ameade/created-by-mismatch

Consistently use '_' for created_by metadata on images
Fix duplicate scheduled images

This patch fixes the issue of the same job sometimes being picked up by
two workers when polling for jobs concurrently.

- In order to avoid the concurrency issue, the sqlalchemy's optimistic
  locking feature is used.
more info:
http://docs.sqlalchemy.org/en/rel_0_7/orm/mapper_config.html?highlight=uuid#sqlalchemy.orm.mapper
- Based on optimistic locking feature, a new column 'version_id' is
  introduced in 'jobs' table that will allow versioning of records when
in use.
- Because of versioning of job records when accessed, if two workers try
  to pick up/update the same job, a StaleDataError will be thrown and
hence prevent the duplication of scheduled images.

related to rm1348
Merge pull request #277 from venkateshsampath/duplicate_scheduled_images_fix

Fix duplicate scheduled images