I've got a fair understanding of the CCCU differences, though I've never compiled a table of my own. I once uploaded the same chart that can be found on the German club's wiki. See
http://www.a2oc.net/forum/attachment.php?attachmentid=11229&d=1357312784
The table provides some information, but doesn't include information about which units only work with full electric glass rather than manual rear windows, which key fobs are cross-compatible, etc.
To answer the OP's question, the AF-unit can, in principle, be used to replace a Q-unit. The AF-unit is a later, more reliable unit that has all the same functionality as the Q-unit. However, key fobs that talk to a Q-unit will not talk to an AF-unit, meaning that alternate key fobs are needed should you wish to make the change.
My car was originally made with a Q-unit, but I changed it for an AF-unit when the opportunity arose, simply for its greater reliability. Fortunately for me, the AF-unit that I sourced came with two compatible key fobs.
For reference, the part number of the key fob that can be linked to an AF CCCU is 8Z0 837 231 D. The D on the end is essential.
Cheers,
Tom