Mb-11519: Check mode value
Mb-11519: Check mode value

Stop if mode value is not valid or supported.

Change-Id: I4c217a7164b1bd1c0d30c339c5d6cdc70814f3ad
Reviewed-on: http://review.couchbase.org/38720
Tested-by: Bin Cui <ed18693fff32c00e22495f4877a3b901bed09041@gmail.com>
Reviewed-by: Steve Yen <ef850f73f7832052d3c6d9b5ddd3a1716d9a57f1@gmail.com>

couchbase/couchbase-cli,couchbase/couchbase-cli