ML2: Fix release of network segments to allocation pools

The recent merge of https://review.openstack.org/#/c/115025/ broke the
release of network segments to allocation pools on network delete,
resulting in network creates eventually failing with
NoNetworkAvailable exceptions. The network_delete() code is rearranged
to properly release the network segments, and a unit test is updated
to verify that the type drivers' release_segment() method is called.

Partially implements: Blueprint ml2-type-driver-refactor

Change-Id: Ica5f11b2012dedfcc097f34f1515f5f3ca208fd2
Merge "ML2: Fix release of network segments to allocation pools"