Update Cisco N1KV plugin to VSM REST api calls

Modify the existing REST calls from the plugin to VSM to update the
attributes and use UUIDs as index, instead of string names, for all
the resources.

Change-Id: Icb4950ea7c6f036e9a25ee79e3f5fe30d40f47de
Closes-Bug: 1233802
Fix IP recycling on exhausted pool

When recycling an IP, allocation pools are loaded with an inner
join with ip avaiblity ranges. However, if the pool is exhausted,
there will be no availability ranges and the query will return
no results because of the inner join. It will therefore be
impossible to reuse IP addresses once the pool has been exhausted.

This patch tries to reload allocation pools without joining on
IP avaiability ranges if the first query did not return any result.
Replacing an inner join with an outer join will not be possible
as postgresql backend does not support 'SELECT ... FOR UPDATE' with
outer joins (for more info see bug 1215350).

The patch also contains unit tests for verifying IP are recycled
correctly even when the pool is exhausted.

Bug 1240353

Change-Id: I87f274bd759cb47be77717f0760d3704f9f34ade
Merge "Fix IP recycling on exhausted pool"
Merge "Update Cisco N1KV plugin to VSM REST api calls"