Fix pluck_primary_key method
What does this MR do and why?
The previous implementation of the pluck_primary_key was wrong because it was firing a SQL query for an already loaded relation. It was doing it because the implementation was calling where(nil) before calling the pluck method, which spawns a new relation that is not loaded, so the pluck fires the SQL query to load the records. It shuold have been implemented something like;
(current_scope || all).pluck(primary_key)
However, Rails already has a method called .ids which does exactly the same thing, so there is no point in maintaining our version.