Move object type field to P1Object.
Add user data to P1Object, remove in log_fn.
Log functions take an object.
Log on notification send, not receive.

This makes things easier to diagnose when other logging occurs between
notifications.

Also don't really need the context parameter in _p1_notify.