source/base: Refactor out callback routine

The callback mechanism will be used by other callback methods in the
same fashion, so we can template and re-use this functionality
diff --git a/.gitignore b/.gitignore
index 884d17b..61aa582 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,4 +46,5 @@
 /test/event
 /test/exception
 /test/internal_sdref
+/test/internal_utils
 /test/source_base