Make drop_pending_events a virtual attribute of Agent.
Do not update last_checked_event_id if an agent cannot receive events.

Use `maximum` while at it.