[RFC 1/2] pmem: Move reusable code to base header files