Modified the setKey method to update the current document's _key value.

Includes tests update.