Refactor the sessions' tests and tweak .gitignore

This adds `lcov` to `.gitignore` and updates the sessions module's test
suite, by removing manual `sinon` invocation.