Refactored agenda

* Added cleanup mechanism for agenda views to perform cleanup before
  closing.
* Updated agenda view & todos agenda view to provide cleanup to remove
  the mappings provided by them.