use inline functions

- and add atomic_set
remove c source
use refmem struct and destructor
remove useless pool allocator
minor refactoring
allow cleanup to be NULL
just bail if we don't have primitives