Welcome to Apple Support Communities
If you sell the iMac with OS X Mountain Lion, it would be illegal, the buyer will be using Mountain Lion illegally (the license isn't transferrable), the buyer will be able to use it without issue (unless he/she wants to reinstall OS X or update App Store apps, that he/she won't be able to do it), the buyer will have to purchase Mountain Lion again even if it's impossible to do it with Mountain Lion installed, you can still use Mountain Lion if you have another Mac and no details will be left on your iMac unless you don't have logged out of App Store.
As you can see, it's much better to install Snow Leopard or the original Mac OS X version, so the buyer won't have problems
From what I know, you can make a one-time transfer to another user, always that you give him/her all the Apple software you have. Read Transfer > http://store.apple.com/Catalog/US/Images/MacOSX.htm