PCBC-218: Detect invalid characters in CAS

Change-Id: I04c39789487097e053d53ac483924d8553f7a98b
Reviewed-on: http://review.couchbase.org/25481
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>