Two-dimensional Riemannian metrics with integrable geodesic flows. Local and global geometry