speedup unicode comparison

Change-Id: I0cc715bb01aa7b5d52fa7815b11cac3fab67a2a8
Reviewed-on: http://review.couchbase.org/29644
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>