cleaned up g_proc_exit, optimized generated code and also added some comments about possible ABI variations. the changes also fix two tests on my system related to cdecl procedures

git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@26918 3ad0048d-3df7-0310-abae-a5850022a9f2