allow overriding utilities and /var location

This patch enables a wrapper to override the /sbin/ip and
/sbin/resolvconf utilities, and the /etc, /var locations.

The idea is to allow non-root execution of vpnc, as tun
can be used by unprivileged user.

A simple vpnc-script wrapper such as the following is doing
the work:
 ---
export HOOKS_DIR="/home/user/vpnc"
export VAR_RUN="/home/user/vpnc/run"
export IPROUTE="sudo /sbin/ip"
export RESOLVCONF="sudo /sbin/resolvconf"

exec /etc/vpnc/vpnc-script
 ---

Configuration:
 ---
Interface name vpn0
Local Port 0
Pidfile /home/user/vpnc/run/pid
Script /home/user/vpnc/vpnc-script
 ---

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
delete tun address on disconnect

This enables persist tun device to be reused in future
connections.

ipv6 is not tested.

Maybe it would be cleaner to define functions for address
manipulation, not sure.

To be simple, this patch only handles iproute2.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
always run the vpnc-script at exit

This allows persisted tun device to be cleaned up for reuse.

This is the minimal change to reach the goal using atexit(),
not sure it is the best way.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
support route metric

This adds optional ROUTE_METRIC environment variable to vpnc-script to
allow set non default routes and dns metrics.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>