Use SIGKILL after delay and only if need

Sometimes OB is not reacting on SIGTERM, we need SIGKILL it.
This change add some delay before we do it.
Update stop.sh

Change "wait for clean shutdown" time to 5s
Merge pull request #526 from Rav3nPL/patch-2

Use SIGKILL after delay and only if need
Remove duplicate test file.
Testfile is no longer executable.
Rewrite tests as unittests.