Extract report functionality from access-lint gem into JS library.

`element_names` is consumed as is by the AccessLint rubygem, not changing for now.