TOOLS-450 some dumprestore js tests query system.indexes or system.namespaces directly

Closes #875

Signed-off-by: Benety Goh <benety@mongodb.com>