flimflam: fix use-after-free of hidden network
When a hidden network fails to connect the cleanup work reclaims the
network block prematurely causing multiple references after memory is
free'd. Fix this by holding a reference over the code that might free
the state and also do not do a deferred update of the device state if
the network is unregistered as this is guaranteed to fail and unneeded
because device state cleanup is already handled at a higher level.
This case can easily be reproduced by connecting to non-existent network;
on timeout badness happens as described above.
(and probably others)
TEST=manual:see above (done under gdb and with wifi+network+service msgs)