Reorder MV operatioins in pg_dump.

Build indexes on empty MVs in the same phase as table indexes.
The materialized views are all defined but empty at that point, so
creating indexes will be fast and will simplify the ordering of
other operations later.

Move REFRESH MATERIALIZED VIEW commands to the end, so that there
is the possibility of allowing database usage that doesn't need
MVs while the data generation for MVs completes.  This is also a
better point to generate the data from a correctness perspective.

We are still figuring out the best thing to do in terms of which
MVs get generated, and whther to add a command-line option to
control that, but this part needs to be done for most possible
resolutions of that discussion.

Per input from Álvaro Herrera and Noah Misch