libs/cbi: add on_init, on_before_commit, on_after_commit, on_before_apply, on_after_a...