Keep migration status if instance still resizing

There is a race condition during finish_resize() where
poll_unconfirmed_resizes() can get called between the database save
of the migration record and instance record. The migration record
will be marked 'finished', enabling poll_unconfirmed_resizes() to pick
it up. But the instance will not have been saved yet to have the
vm_state of RESIZED, and task_state of None. The task_state will
still be RESIZE_FINISH. This will cause poll_unconfirmed_resizes() to
put the migration record in error state.

Instead, poll_unconfirmed_resizes() should ignore instances with
a task state of RESIZE_FINISH and not put the migration record
into error state.

Change-Id: I825234de5e4a4f0cc906ac05b715ed85cd953aa1
Closes-Bug: #1376933
Separate and refactor affinity filter tests

The unit tests for the scheduler affinity tests were actually *not*
NoDBTestCase tests. In fact, they were relying on the database to create
instance objects instead of just mocking out the call to
nova.compute.api.get_all(). This patch corrects that and separates out
the affinity filter unit tests out of test_host_filters.py.

Change-Id: Ib7268a49e115fbeff7f18c569cecd82b3d3e8cb3
Merge "Separate and refactor affinity filter tests"
Merge "Keep migration status if instance still resizing"