Near-Optimal Methods for Minimizing Star-Convex Functions and Beyond