A Generalization of GrĂ¼ss' Inequality in Inner Product Spaces and Applications