Handle void elements in JS unclosed tags checker

Makes it so that tags such as <br> are not detected as unclosed.
Includes other minor code changes.

Change-Id: I6a50585ca7404153a8411f644c1cf87505f56782