Correct ActiveModel::Conversion#to_key implementation

The ActiveModel::Conversion#to_key should first check for the primary_key defined on the class of the object before opting for the hard-coded :id attribute.