lib: fixed to drop state before deleting netdev
Merge pull request #330 from mtomaschewski/state-drop