Some Gronwall Type Inequalities and Applications