Implement channel-based rate-limiting design
This is a subset of #102, for the part needed for secure onion services. The design is in doc/dev/notes/bw-rate-limit.md
For the current estimate, I'm planning to do a minimal version of this, hiding the implementation details so that we can make it better down the line.