core: add assertions in memory pool to track a bug

Link: https://github.com/GeneAssembly/biosal/issues/782
Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>