webpack-make: drop our home-baked "endsWith"
webpack-make: drop our home-baked "endsWith"

We have an inconsistent mix of using the built-in "endsWith" and our own
home-baked version.  LGTM just flagged our own version as legitimately
buggy, for not checking for -1 return from lastIndexOf, so let's just
drop it and use the built-in method consistently.

martinpitt/cockpit,martinpitt/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,mvollmer/cockpit,garrett/cockpit,mvollmer/cockpit,mvollmer/cockpit,martinpitt/cockpit,garrett/cockpit,garrett/cockpit,martinpitt/cockpit,cockpit-project/cockpit,mvollmer/cockpit,cockpit-project/cockpit,mvollmer/cockpit,garrett/cockpit,cockpit-project/cockpit,martinpitt/cockpit,garrett/cockpit