Update active_record.rb to use 'from_state' and 'to_state' avoiding reserved words

These are reserved in some relational databases