Some functional test fixes

This is finicky. Sometimes FF updates or Selenium updates require
one another and one of the two breaks things. In this case, I think
it's getting tripped up by a few things with timing on opening and
closing the sidebar, but there was also an out of date call to the
old `checkForEndSelection` method that @csillag might have caught.
It's possible the tests were red before that, though, due to any
of the reasons above.

I also fixed the highlight helper method to do follow the intent of
its argument.
Update selenium