check |current_move_loop_change_| earlier

I've seen DCHECK failures for on_current_move_finished_.is_null().
After debugging some, I've noticed that sometimes the window
is destroyed (thus in_flight_map_ clears its change_id) before
the callback is called. This means the ongoing window move never
finishes and the next attempt of window move causes DCHECK failures.

Bug: 867074
Test: the new unit test
Change-Id: I9ed2d2b9aa79546c7175024a722c00924eba890d
Reviewed-on: https://chromium-review.googlesource.com/1195659
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587318}
2 files changed