Add support for thiscall pinvkes

This is used extensively by Managed C++, and may also be useful for cxxi.