magit-need-refresh: ignore non-magit buffers

Do not add buffers to `magit-refresh-needing-buffers' that do not
actually need to be updated because their modes don't derive from
`magit-mode'.  This does not affect how file visiting buffers
are *reverted*, which is different from being "refreshed" (but is
also triggered in `magit-refresh-wrapper').