Fix for intf nh tied to discard nh upon vm reboot.
Fix for intf nh tied to discard nh upon vm reboot.

On vm restart, VMI is deleted, and the intf nh, label get marked for delete.
Before the nh is deleted, the ADD/change is triggered for it since the VM
is up again. In the existing design, as part of db_table.cc, the change is
triggered before clearing the delete on this nh.
DBTable::Input ()
 if (req->oper == DBRequest::DB_ENTRY_ADD_CHANGE) {
         if (entry) {
             if (OnChange(entry, req) || entry->IsDeleted()) {
                 // The entry may currently be marked as deleted.
                 entry->ClearDelete();
                 tbl_partition->Change(entry);
             }

The MPLS allocation triggered as part of this nh change, does a lookup for
active nh entry in db using the nh key. Since the nh is marked for delete,
label is pointed to discard nh.
Fix has been to clear the delete as part of NextHop::OnChange() before
doing any change ops, which prepones the clear that would have happened
as part of DBTable::Input above.

Change-Id: Ie202db6f7bfca6dc96105bb897e7fe58e2369df9
Closes-Bug: #1800128

rombie/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,rombie/contrail-controller