Fix AttributeError during startup of ovs agent in DVR mode

Make sure the agent starts processing incoming requests only after the entire
initialization is complete. This is done by making explicit when the rpc loop
is supposed to start, i.e. right at the end of the init process.

This fix was necessary because the agent starts processing rpc messages even
though it has not completed the entire initialization of bridges and data
structures; this is usually okay, but in case of DVR, this leads to a
situation where during the the first run, the agent asks the server to be
assigned a MAC address; this in turn leads the server to fanout the generated
MAC to the running agents, the requesting one included; because of the
incomplete setup, the above mentioned error occurs. During subsequent
restarts, the problem no longer appears.

Closes-bug: #1395196

Change-Id: I792697b94fef39971693cf8aff715c270601cecb
Avoid unnecessary explicit str() conversion around exceptions

There are number of places like

except Exception as exc:
            LOG.error("Failed to get network: %s", str(exc))

where str() is not needed since %s substitution already does
the same conversion. Also LOG.error could be replaced with
LOG.exception, so argument exc won't be needed at all.

Closes-bug: #1398839

Change-Id: I73cc6e1ce55ade08e7706b99a5ab075f7059a4ef
Merge "Fix AttributeError during startup of ovs agent in DVR mode"
Merge "Avoid unnecessary explicit str() conversion around exceptions"