Fixes task_log_get and task_log_get_all signatures

Fixes signatures for the above methods in nova/db/api.py
based on the recent TaskLog refactor on sqlalchemy/api.py.
Also adds unit tests for TaskLog.

Fixes Bug 1102652.

Change-Id: Id7ce74b8941d9eb6a50dfbfaa62e0fe05dd467c2
Add system_metadata to db.instance_get_active_by_window_joined

Without this compute/utils/notify_usage_exists() throws an
exception when looking for system_metadata in the instance data

Change-Id: I3606aa18b1aa69f98de820840c080f848af56157
Merge "Add system_metadata to db.instance_get_active_by_window_joined"
Merge "Fixes task_log_get and task_log_get_all signatures"
Merge remote-tracking branch 'citrix/master' into build-temp