Draft: Fix page namespaces bug in replica code
This MR fixes a bug that caused errors in data loaded from replicas.
For pages specified without a namespace in a page pile, the replica client would load data for all pages with the same title regardless of their namespace. For example, if only "Title" was present in the page pile, the client would still load data for pages named "Manual:Title", "Project:Title", etc.
List of changes:
- Correct the generation of constraints
- Simplify the generated SQL
- Simplify data structures returned by SQL queries
- Update tests