Adding logs to tasks

Logging is currently missing in the REST api layer in v2/tasks

Related to bug 1267213

Change-Id: I608390a7be1b2b02f281d974bd456a8e9e7897f7
Cleans up imports in models.py

Some of the imports were placed in incorrect order.

Change-Id: I14555b5c3bd6871d4b1e0cea7e03c191ffd6cf33
Decouple the config dependence on glance domain

Move the configurations which core domain objects depend on to
common/config.py, and add a argument "task_time_to_live" of Task's
 __init__ method and TaskFactory's new_task method for delivering
the CONF.task.task_time_to_live value.
For convenience,the argument "task_time_to_live" is set a default value 48.

Change-Id: Iffda1ecd25470824c812d66a27fa64ebbaabcf07
Closes-Bug: #1250633
Merge "Adding logs to tasks"
Merge "Cleans up imports in models.py"