socketcand: fix data type for libconfig

Just silence this warning ...
/usr/include/libconfig.h:266:26:
note: expected ‘int *’ but argument is of type ‘long int *’

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
socketcand[cl] : remove obsolete includes

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
socketcand: add local CAN includes

To introduce the latest ISO 15765-2 isotp includes the relevant CAN includes
are added to the project.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
socketcand: unify state changes and echo command

To introduce a new state for isotp the state changes have be consolidated in a
common 'state_changed()' function. Additionally the 'echo' function is now
available in all states and the statistics pthread is only handled in
state_control.c

Don't know why 'pthread_cancel(statistics_thread);' was invoked in state_raw.c

As it was missing in the bcm state and is properly handled in state control
it is (hopefully) the reigt way to remove it from state_raw.c

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>