PMC: moved many inline non-templated routines to the library

This change is mostly harmless on performance,
there is some impact for going into the library.
This allows PMC to be used with JITs that dont support inline asm.