Fix bugs, support for ActiveModel::Dirty

Had to initialize attribute instance variables directly in initializer
so that ActiveModel::Dirty didn't report the object had changed
immediately after creation.
Fixed bug in attribute data typing with the Time class.
Correctly implemented ActiveModel validation callbacks.
Tests for Rails should have a common setup that defines the Model
subclasses once so they can be re-used.