Make DAO base class extensible

Makes the DAO base class extensible on the Entity level.
(Fixes #21).