Namespace filtering in replace.py

The namespace filtering (-namespace, -ns) was broken in core for
replace.py, leading to changes intended for one (or more) namespace(s)
bleeding into others.

This commit reintroduces the logic from the compat tree.

This commmit also removes the redundant handling of -page/PageTitles;
that argument is handled by pagegenerators.

Bug: 57303

Change-Id: I05845e6962fbae92719e2a128bb93de6044c2ed5
Merge "Namespace filtering in replace.py"