Adding support for class-based close actions

This behavior is being added to allow for a generic closing of messages.  This should prevent the need for each plugin/theme that implements close functionality to implement it completely on its own.

This is a direct result of expanding our style guide: https://github.com/GigaOM/gigaom/issues/4872