Terminate model on overrun and stop request
External mode fix

1. During execution in external mode with rates 0.001 (and higher) user
was not able to terminate model immediately also block parameter upload
was possible only after duration defined in External Mode Control Panel.
This commit fix this issue.
2. While disconnecting from target Simulink is complaining that target
is not running. Adding delay will allow proper model termination and
allows disconnect packet to be send beafore microdaq tcp socket close
call.