Properly kill running server after tests

- verify that server is up and running by http request,
  and not port scanning
- look for process pid when verification is done for server
- use lsof for server pid detection
- fix return from function, it should be either echoi $pid in function,
  or echo $?

Change-Id: I10b13eaec267dd7ccb779acc2d12200884074e1d
Closes-Bug: #1335847
Merge "Properly kill running server after tests"