EAGLESIX-3157: matcher: fix jshint issues

Fix JSHint issues with new pipeline matcher code ported from 2.6.5 code.
Part of an effort to cleanup various JSHint issues in one fell swoop so that we can keep things a bit cleaner going forward.

Sorry, meant to comment on it before somebody found it.
While fixing the JSHint errors here it looked like this was mostly unimplemented so many of the variables being accessed didn't exist. I ported a couple of lines over from the original source code and left a TODO for the rest of it.