Add #to_key method to hydra models

This helper method is used by form_for helper