Fix update_device_up method of linuxbridge plugin

Also add unit tests covering update_device_up and update_device_down
methods

(cherry picked from commit: 01e45596fae2818b41c76b41bef46e86c5d33231)

Change-Id: I97f2f9249b684aa5350b3f0621754543e80bec70
Closes-Bug: #1241602
Tune up report and downtime intervals for l2 agent

If the neutron server erroneously thinks that the l2 agent is down
it will fail to bind a port, which can lead to VM's spawn errors.
However, the issue is only transient because the agent effectively
is only 'late' in reporting back.

Best solution would be an alpha-count algorithm (so that we can detect
persistent failures more reliably), but for now let's be more tolerant
assuming that the agent is down by waiting at least twice the report
interval plus a tiny teeny bit.

(cherry picked from commit 291048aba2fcaec8afee3011fb4c12c6ca0ebbba)

Close-bug: #1244255

Change-Id: I544135ce1f6b7eaefb34ac44af8f5844d92ddd95
Merge "Tune up report and downtime intervals for l2 agent" into stable/havana
Merge branch 'stable/havana' of https://github.com/openstack/quantum into havana/stable