Implement a filter for databases

This is a port of https://github.com/apache/couchdb/pull/210 with the difference that I am using the upper tabs now and not the sidebar for the searchinput (like in the Changes-Filter, ca7843b81e9dc85921cb6e612e0e2cc51ce64a98) 

---

Uses a new model to manage the state of the different search
filters to filter the view.

Nice feature: the filter for the database (upper input) and
the filters for the type (buttons) work nicely together,
so you can filter out all replications for that
database (let's name it registry)  without the compaction,
if you choose replication as type and enter "registry" in the
top input.

Closes COUCHDB-2125