Three-dimensional flat bands in pyrochlore metal CaNi2