make work with recent gerrits (2.5+, digest auth)

also:
  - fix test to work with digest auth
  - make tests run with recent specs
    (needed to require 'rspec/expectations')
  - trailing whitespace cleanup in edited files