Reduces number of queries in AutofollowUsers (#690)
Reduces number of queries in AutofollowUsers (#690)

`AutofollowUsers` needs to iterate over all users to check if given user
needs to follow new post.

There were two performance problems in this code:
1. In the code that constructed a hash with messageboard preferences for
each user who had one there was no eager loading. This resulted in one
`SELECT` query for each user with messageboard preferences.
2. There is eager loading for `User#thredded_user_preference`
association. Because it wasn't passed to
`Thredded::UserMessageboardPreference` Rails didn't use eager loaded
object and fired a query instead. This resulted in one `SELECT` query
for each user.

This commit fixes both problems by adding `:user` eager loading for
`user_messageboard_preferences` and by explitly passing `user_preference`
to `Thredded::UserMessageboardPreference` initializer to ensure that
eager loaded object is used.
jayroh/thredded,thredded/thredded,jayroh/thredded,jayroh/thredded,thredded/thredded,thredded/thredded,jayroh/thredded,thredded/thredded