Fixes tests:
1) unsecure server support fixed
2) refectores code
3) removes some tests (upgrade handshake code moved into TestsHelper)