Fixed bug in entity init; broke out to new class.

Breezing right along with a deceptively green bar until we get to
entity factories (see next commit), which were unable to create
Post/UserEntity instances with expected instance variables. Further
poking led to a fix, which led to breaking out common code into a new
shared class that has been (temporarily!) stuck into the `lib`
directory. Whee!

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