Fix ets lookup case_clause error after ddoc is updated
Fix ets lookup case_clause error after ddoc is updated

This happens if the ddoc_updated event is received after
a client opens the new view group or if a design document
is updated several times in a row and there are still
clients streaming views from 2 or more view groups that
match old versions of the design document.

This relates to COUCHDB-1309

fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb