Compile dpctl as lib for ns3.

This commit includes a new cpp flag DPCTL_AS_LIB to avoid compile main function from dpctl.c, so it can be used as lib by ns3.