Fix testcase 'test_create_subnet_with_two_host_routes' failed

Fix bug 1179348

Change-Id: I0cd5d303da0f394cec173aeee52efcd337282c94
Fix testcase 'TestPortsV2.test_range_allocation' failed randomly

Fix bug 1179370

Change-Id: Id5645546c98549c9d7cf68359e0f6fa128ad84b7