buxtond: Fix consistency of notification lists

Appending an item to a list doesn't modify it's first element
but removing an item may modify that first element. Thus
taking it into account in `unregister_notification` does matter.

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
shared: Fix computation of written size

When write returned -1 with a errno==EAGAIN, the
written size was decremented by one, what is wrong!

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>