MDL-46284 tool_messageinbound: Mark messages as unseen on error

When we are unable to inform a user of an error, mark their message as
unseen and unflagged so that it can be processed again.

Also fail correctly when a handler is disabled.

This issue is a part of the MDL-47194 Task.
This issue is a part of the MDL-39707 Epic.