[api] Add `filter` support

CouchDB's filtered `_changes` feed is described in
http://guide.couchdb.org/draft/notifications.html#filters.