Always insert methods into the search index, even if we're currently in a private module.

Previously, this caused methods of re-exported types to not be inserted into
the search index. This fix may introduce some false positives, but in my
testing they appear as orphaned methods and end up not being inserted into the
final search index at a later stage.

Fixes issue #11943
Add a simple test for rustdoc search index contents
auto merge of #16767 : SiegeLord/rust/reexported_methods, r=cmr

Previously, this caused methods of re-exported types to not be inserted into
the search index. This fix may introduce some false positives, but in my
testing they appear as orphaned methods and end up not being inserted into the
final search index at a later stage.

Fixes issue #11943