Factored out Repository common class code.

The only current difference between the code for PostRepository and
UserRepository is the default parameters used to initialise instances
of the two classes. This has been moved into a new common superclass,
RepositoryBase.

RSpec: 905 examples, 0 failures (but see Issue #87)
RuboCop: 179 files inspected, no offenses detected