Added close button to template, and close on escape.

What title says.

I also changed the template to use h4 for the title, since that is the standard in BS3.

The close-on-escape functionality is only applied on dialogs where the autoclose option is enabled.