There are pros and cons for both. I was also looking at both, but for what I was doing the Mac Mini was the better choice. I personally do not like the all in one type of computer. With the 21.5" iMac when you go to upgrade you will be throwing away a very good monitor. I think the 27" can work as a monitor for other computers if needed. (feel free to correct me if I am wrong here on the monitors here).
Also it gave me the ability to choose my own (non glossy) monitor. I went with an LG IPS display that looks just as good and no reflections.
I have seen some complain about the included mouse in the iMac 21.5" (magic mouse) as it is too small, so you will still need to replace that if it doesn't feel good to you, and a good mouse will run about $50 or more. (did find the M705 for $30 at a local B&M store). I don't like the wireless keyboard from Apple as I wanted a number pad, so went with the Logitech K750 ($60) for Mac, and love it. So I would have been adding $110 to the price any way.
As you can see everyone has different needs. Since I wanted to choose my own non glossy monitor, didn't like the included Mouse and Keyboard it was better for me just to go with the Mac Mini. But for many who like the glossy monitor as well as the mouse and keyboard that are included then you would want to look at the iMac. Also if space is an issue it is hard to do better than the iMac for saving space.
Good luck on your choice. I bet you will be happy with either.
Edit:
I was looking at going with the Apple TV as well, so did a lot of research, and found that even a lot of Apple/Mac websites looked toward the Roku 2 instead. My parents were looking at getting wireless internet TV and due to their needs only the Roku had the channels they wanted, so I bought it for them and tested it out on my TV before I was to give it to them. Long story short.....they never got their Roku from me. The amount of content is amazing, but if you are into wanting to keep an entire Apple infrastructure then the Apple TV is the only way to go. Just my 2 cents that is only worth 1.