I have to admit, the research that I've done suggests that it is not possible to do this (and that it is more complicated than originally thought). The Raspberry Pi outputs HDMI, and iMacs (at least those from mid-2010) do not accept HDMI inputs -- they only accept Mini DisplayPort inputs, which typically come from other Apple products.
As far as I'm aware, HDMI and Mini DisplayPort are incompatible formats, and the only way to get from HDMI to DisplayPort is to use a bulky, expensive converter. You cannot do this with a passive adapter; however, if you want to go in the other direction (e.g. use the iMac as an output device by connecting a DisplayPort on your iMac to a HDMI television) then this is possible, quite cheaply.
Basically, the iMac can be a HDMI output device, but not a HDMI input device.
Is this the case? And if so, does anyone know a workaround (that doesn't involve spending £150 on a Kanex XD)?