MB-11305 Ensure that memcpy() source is not NULL

As noted by Clang static analyzer. The source of memcpy {key} cannot
be NULL here (as keylen is checked) so to squelch the warning, add an
assert().

Change-Id: I516607efcc8156fb310cdc635f1cf5615c3441c7
Reviewed-on: http://review.couchbase.org/37964
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>