Properly venting a gas water heater
I did a lot more research and I have concluded that what I proposed is mostly safe. There are a few important points


Single wall vent pipes must be 6 inches or more from combustibles (this includes sheetrock!). That means you basically can't use it in walls or near joists/rafters.
Double wall vent pipes must be 1 inch or more from combustibles. You can't put it against sheetrock or studs, etc. That means for a 3 inch pipe (4-5 inches double walled) you need a 6-7 inch wall.
You should use a firestop (a sheet of flashing with a pipe sized hole) at walls and floors/ceilings to keep the pipe a safe distance from studs/sheetrock.
to prevent backdrafting from a Whole House Fan another fire stop should be installed directly below the roof plywood to limit the airflow from the attic to the top of the vent pipe.