Pathwise Integration and functional calculus for paths with finite quadratic variation