update self closing behaviour for all formats and elements

based on http://xahlee.info/js/html5_non-closing_tag.html