Add BigCouch support

Please take changes for BigCouch back-end support in WMAgent. Upon previous request (PR#116) this PR contains changes as single commit. With this PR you may discard #116.