Fix lxc rootfs attached two devices in some action

During resizing/rebooting a lxc container, create_domain action
will be called and lxc rootfs will be attached to device again.
So before this action, We need to teardown the container to
make sure lxc_root_device is detached when container is destroyed.

Closes-bug: #1243083
Related-bug: #1208387

Change-Id: Idd1862c7f212dc253b6273b07b020c86a94e658e
Ensure instance action event list in order

For two events also most happening at the same time, e.g. schedule and
run_instance, instance-action may fail to do the correct sorting because
the "create_at" column in db has the same value.

This change fixes this issue by sorting in "create_at" first, and then
in database generated "id" column, both in descending order.

Closes-bug: 1254764

Change-Id: I245a577ef2821fa7f3316bb8a21b7e6370498dd0
Merge "Ensure instance action event list in order"
Merge "Fix lxc rootfs attached two devices in some action"