Online Convex Optimization with Hard Constraints: Towards the Best of Two Worlds and Beyond