- Game keys cannot be attached to two battle.net accounts. (trying to do so gives a message saying that that key is already in use)
- Game keys cannot be unregistered or transferred by any user options. (The interface has nothing of the sort)
If this needs to be done, you'd have to contact Blizzard customer support, but I'm not sure they'll let you. They might though.
After re-reading through the TOS, there are two separate "licenses" involved (from a legal perspective), the license to use the game client, and the account to play with. The account cannot be sold. The client can be transferred, but the new owner would have to purchase a new account, that is supposedly available at blizzard.com or battle.net
(I am not a lawyer, my advice is not legal advice)