Replace ActiveRecord pattern with DataMapper.

Done as an experiment out of curiosity, rather than need.