move common pool cleanup boilerplate into a new entitypool_cleanup(...) macro