Use nanoseconds for cache_key timestamp instead of plain seconds

This has caused several issues for our app, specially in the test environment.
I think it would be better to define the cache key using nanoseconds, as in:
```ruby
def cache_key
  ...
  return "#{model_key}/#{id}-#{updated_at.utc.to_s(:nsec)}" if do_or_do_not(:updated_at)
  ...
end
```

Fixes #3772.