Remove redundant code in tests/unit/test_l3_agent

Change-Id: I87d09507cb9e9e37179d6d2035b211aa99f37260
Make test_l3_agent._prepare_router_data a module function

Remove an unneeded class variable, allowing _prepare_router_data
to be changed to a module level function. This allows the function
to be reused by other tests cases.

Change-Id: Ia4de3c535c703fbb2528e6cc9594bcd34f50aca1
Set promote_secondaries when creating namespaces

there is a sysconf entry which controls how deletion of the primary ip
is performed (/proc/sys/net/ipv4/conf/all/promote_secondaries). when set
instead of deleting the secondary addresses, one of them will be
promoted to primary ip.

Without it, when init_l3 called on a port, it may unexpectedly delete
some useful ips.

Change-Id: I0b1b3bd6ade21129532c842daa31059ea164719e
Closes-bug: 1343320
Merge "Remove redundant code in tests/unit/test_l3_agent"
Merge "Make test_l3_agent._prepare_router_data a module function"
Merge "Set promote_secondaries when creating namespaces"