Theory of the nonequilibrium electronic Mach-Zehnder interferometer