On third Hankel determinants for subclasses of analytic functions and close-to-convex harmonic mappings