API does need new image_ref on rebuild immediately.
API does need new image_ref on rebuild immediately.

This restores the DB update for image_ref immediately on rebuild, but
passes the old image_ref to the manager for use with instance.exists
notification.

Fixes the fix for bug 997245

Change-Id: I8cf6a8759e8fe605bb023048a320b15eee3bcd80

n0ano/ganttclient