Refactor the store_and_search/2 function used by the type, bucket, and
key encoding test. Updates so that the arabic and hebrew tests
pass. The japanese test still fails because the characters are not
UTF-8.