Update network related extension methods so they work correctly with
both, OpenStack and Rackspace driver.

Part of LIBCLOUD-368.
Add tests for OpenStack and Rackspace networks functionality.