Make _build_network_info_model testable

This restructures the quantumapi _build_network_info_model()
method to be testable and adds tests for each of the smaller
components. It also provides verification for bug 1171636 by
ensuring that ports returned from the client that are not in the
set of networks passed don't cause the failure detailed in that
bug.

Change-Id: I82f20f68122fc38e72c31e52283529614252c174
Merge "Make _build_network_info_model testable"