Add tests to demonstrate value of to_param
Add tests to demonstrate value of to_param

These tests were prompted by the presence of lots of deprecation
warnings under Rails 5.1, due to the calls to the `attribute_changed?`
method within `to_param`, whose behaviour was expected to change in
Rails 5.2. I believe the fix might involve a significant change to
`to_param`, so I've also add other tests to comprehensively describe
the behaviour of `to_param` in various scenarios where the record
succeeded or failed to save.

I believe the new callback test also demonstrates a bug in all
versions of FriendlyId up to Rails 5.2; the value of the slug used in
the callback is the old value. This is a problem if we use that slug
to generate a URL as part of behaviour called within that callback.

norman/friendly_id