Return unauthorized error if encountered on any shard

We had a mismatch here that caused us to return an unpleasant 500
status code (after discarding lots of unauthorized events from each
shard).

The mismatch was introduced in "Teach fabric_util:get_db/2 about maintenance
mode".

I also simplified the open_shard function and tuple syntax for further
clarity in this critical section.

This commit is a backport of:

 - f657a4c211d9f7e916be6e721a7474216e61a1e5

From:

 - https://git-wip-us.apache.org/repos/asf/couchdb-fabric.git