Added due date notifications

The recursive loop used to notify about expiry dates has been reused in
order to provide due date notifications. The function was moved outside
of the agenda.define statements in order to be used by multiple
definitions