Give user an option to drop pending events when enabling an agent.

This is shown in a confirmation dialog introduced for enable/disable
actions.
Fix debug code.
Reduce duplicates.
Add a tooltip for the "Drop pending events" option.
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.
Move these specs to the right splace.
Add a spec for how drop_pending_events= should work.
Merge pull request #511 from knu/agent-drop_pending_events

Give user an option to drop pending events when enabling an agent.