Add helpers for COM.

AMTL for the most part works with COM reference counting - these are some helpers for QueryInterface() and such.