The BMW M3 will continue to offer petrol power, but the iconic nameplate will also be applied to an electric sports sedan.