Use getNKey() instead of getKey().length()

This is a preparation for stop using std::string for the key

Change-Id: I0ccb201cfaa49bbeafd45ad1576e632b300a8106
Reviewed-on: http://review.couchbase.org/36813
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>