Fix and refactor modals

* Fix escape key not closing modals due to missing tabindex attr ([See this issue](https://github.com/twbs/bootstrap/issues/4663))
* Remove the restriction of "click backdrop to close" in sensible modals (#498)
* Move modal options to the template