In Maine, N.H., Vermont, Mass., Conn. and R.I., voters went largely Democratic, but Republicans won some top offices.