Detection of client-state and persistent within wickedd

Additional changes:

- disable unused-function warning in ifdown.c
- introduce FSM state type and share with wickedd