shell: mqtt: cancel disconnect work on connect event

If the disconnect work has not yet run when a connect event is received the
connect event is dropped.

Prevent this behaviour by reorganizing `network_evt_handler()`.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
1 file changed