Add option for retry number of connection attempts

This patch adds a new option (-r | --retries) to specify how many times the
client should attempt to connect to the Neutron server when using idempotent
methods (GET, PUT and DELETE). The patch also provides more user-friendly
message when it's impossible to connect to Neutron server from CLI and
ensures that connection-related exceptions are raised to the caller by
default when neutronclient is used as a library.

DocImpact
Closes-Bug: #1312225

Change-Id: Id74d7cf9a0e8c5d2cd3ee4851c883d5286bea19d
Introduce shadow resources for NeutronCommands

With the acceptance of the v2 LBaaS object model we will be required to
support both the original v1 (soon to be deprecated) and v2
side-by-side. Not surprisingly these two modelsshare a number of object
types (ie. pools, members, etc.) In order to handle this overlap of
object names, the API prefixes v1 with /lb whereas v2 is prefixed with
/lbaas.

This presents a problem for python-neutronclient in that resource name
alone (until now) was adequate for the string interpolation that helps
derive the method name to be called. Now that we have, for instance,
two different "pool" objects, we need a way to handle each uniquely.

Therefore, in order to maintain backwards compatibility, and minimize
complexity, this change introduces the concept of a shadow resource.
This shadow recource is used to direct the client at the correct paths
and methods to call internally, get still leverage the same logic that
has enabled resources to be manipulated by the de facto resource name.

Shadow resources are only necessary when an API is in this particular
type of scenario: the deprecation of a previous and overlapping former
API. Otherwise, new and existing API's can continue to use the same
logic as before.

This change also moves the 'resource' attributes from the Neutron
subclasses into NeutronCommand itself  as they were common to all the
subcommands already.

Change-Id: I69270debe25aac2659977d66d7887154ef0cdddf
Partially-implements: blueprint lbaas-api-and-objmodel-improvement
Merge "Introduce shadow resources for NeutronCommands"
Merge "Add option for retry number of connection attempts"