First review this IFIXIT guide: iMac Intel 27" EMC 2639 CPU Replacement. While it is possible to remove it is not something I would recommend as the difference between the i5 and i7 chips is not enough gain given the risks here.
Apple marks the chip with a seal so if you do replace it, Apple will not offer warranty for your system! Your AppleCare service agreement is also voided!
I also must warn you the newer 'Thin Series' iMac's are a bear to open if you don't use the correct tools and follow the IFIXIT guides to the letter you will likely damage your display which would be an expensive error!
Bottom line here: Don't do it its not worth it!