Add security limiters to tunnels

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