Validate network config (vlan)

Validate to make sure empty physical networks
are not permitted. Added unit test as well.

Change-Id: Ie55fab3c53276ed48d5e9d603e8c1dc59fa9cc32
Closes-Bug: 1325664
Make L2 DVR Agent start successfully without an active neutron server

If the L2 Agent is started before the neutron controller
is available, it will fail to obtain its unique DVR MAC
address, and fall-back to operate in non-DVR mode
permanently.

This fix does two things:
1. Makes the L2 Agent attempt to retry obtaining a DVR MAC
address up to five times on initialization, which should be
enough time for RPC to be successful.  On failure, it will
fall back to non-DVR mode, ensuring that basic switching
continues to be functional.

2. Correctly obtains the current operating mode of the
L2 Agent in _report_state(), instead of only reporting
the configured state.  This operating mode is carried
in 'in_distributed_mode' attribute of agent state, and
is separate from the existing enable_distributed_routing
static config that is already sent.

Change-Id: I5fd9bf4163eafa321c5fca7ffb7901ae289f323b
Closes-bug: #1364215
Merge "Make L2 DVR Agent start successfully without an active neutron server"
Merge "Validate network config (vlan)"
Merge branch 'master' of https://github.com/openstack/quantum