Support passing Python callbacks to sr_session_source_add.