If I have this right, you kinda can, but the catch is that you need the original 3DS and your new one first. You would do a system transfer to your new 3DS and then you could 'reset' the old one and sell it.
All the games and stuff are tied to the 3DS and your NNID. Though at this time, you can't have the NNID on more than one 3DS.
So, if you sold the 3DS, then bought a new one in the future, sorry but you're out of luck with all those games.