A Convex Optimization Framework for Minimum Lap Time Design and Control of Electric Race Cars