Learning and Testing Convex Functions