Gradings on the algebra of upper triangular matrices of size three