Viewport pipeline: finish overhaul of stage 1

Apologies for the size of this commit, but the various viewport
functions desperately needed to be renamed and clarified.  Because they
are accessed from all over the program, a lot of files were affected by
the search+replace.