framework.py: check for callback and invoke

This migrates the callback infrastructure from https://github.com/openmicroscopy/snoopycrimecop/pull/165 to yaclifw for migrating scc. I've take the chance to fix the plurality (`ns.callbacks` wasn't a list in scc) and checking for callable-ness. 

/cc @sbesson @mancs