generalize sequence of libcouchstore imports

and avoid unnecessarily repeating try-except statements

Change-Id: I215b2730212e1295635800aa11177c569ea7fc3e
Reviewed-on: http://review.couchbase.org/34101
Reviewed-by: Aaron Miller <apage43@ninjawhale.com>
Tested-by: Aaron Miller <apage43@ninjawhale.com>