Add prefix-based subscription matching.

Also started fleshing out interface for finer-grained access control
(what topics an endpoint wants to publish to peers and what topics an
endpoint wants to accept from peers), but not finished implementing.