Energy and Quadratic Invariants Preserving Integrators of Gaussian Type