Add security limiters to tunnels

DONT MERGE YET

Implements most of the stuff listed in https://github.com/Tribler/tribler/issues/679