Optimization fix in {resource}_count plugin_db APIs

When there are no filters or just tenant-id filter for {resource}_count,
it is better to get the count of the resources directly from the
vnc library instead of calculating the len() return values of {resource}_list call.

Fixes bug: #1391801

Change-Id: I5d80a5e1df5f752b41cb1adcc7e8e989fcf83548
Close all the fds of the child before exec

This patch closes all the fds (starting from 3) of
the child before exec in InstanceTask.

Please see the bug description for more details.

Change-Id: I9f18f88c9c58540ad6358a2a989f344f60be86d8
Closes-bug: #1394300
Make TaskScheduler::WaitForTerminateCompletion() platform-independent.
Create TaskScheduler::CountThreadsPerPid() method in both Linux and FreeBSD
implementations, to chceck if all threads exited for a given PID.
This solves an issue on FreeBSD, where tests hanged after passing.

Change-Id: I2467ce697fd97e7b0a7a38e70164e2ea9ae2dda1
Fix address family config generated for MX

- Address family names are slightly different in junos from what we have in
contrail. We now maintain a map to convert from contrail to junos.
- We were not programming families on session if there were any configured.
Added support for that.
- Added test case for the same

Change-Id: I43412427a013dd73087dbd6174172ef424664161
Replace relative paths with just package names for unit tests

Change-Id: I839d8db9d833165992a5f8c4fede052e10804b08
Merge "Optimization fix in {resource}_count plugin_db APIs"
Merge "Make TaskScheduler::WaitForTerminateCompletion() platform-independent. Create TaskScheduler::CountThreadsPerPid() method in both Linux and FreeBSD implementations, to chceck if all threads exited for a given PID. This solves an issue on FreeBSD, where tests hanged after passing."
Merge "Fix address family config generated for MX"
Add support for new tables to support external devices

Initial changes to support managing of external devices. Following tables
are added,

Physical-Device :
Table for physical-router defined in configuration

Physical-Interface :
Physical-Interface on physical-router. Interface can be local when its
attached to local vrouter. Interface is remote when its attached to
an external physical-device

Logical-Interface:
Multiple Logical interface interfaces can be created over an phyiscal-interface.
Currently agent supports only vlan-tag based Logical-Interfaces

Physical-Device-Vn:
Table of physical-device to virtual-network. The table is built from following
configuration
<physical-router> - <physical-interface> - <logical-interface> - <VMI> - <VN>

Added XML based UT framework for new tables

Change-Id: I313d89ca944e46b02ac0639f26807b1ba2047ae8
Merge "Close all the fds of the child before exec"
Merge "Replace relative paths with just package names for unit tests"
Merge "Add support for new tables to support external devices"
Merge remote-tracking branch 'upstream/master' into ovs_gw_merge

Conflicts:
	src/vnsw/agent/cmn/agent.h
	src/vnsw/agent/init/agent_init.cc
	src/vnsw/agent/init/agent_param.cc
	src/vnsw/agent/ksync/interface_ksync.cc
	src/vnsw/agent/oper/agent.sandesh
	src/vnsw/agent/oper/interface.cc
	src/vnsw/agent/oper/physical_interface.h
	src/vnsw/agent/oper/test/SConscript
	src/vnsw/agent/oper/vm_interface.cc
	src/vnsw/agent/oper/vm_interface.h
	src/vnsw/agent/oper/vn.cc
	src/vnsw/agent/pkt/test/test_pkt.cc
	src/vnsw/agent/test-xml/test_xml.cc
	src/vnsw/agent/test-xml/test_xml_oper.cc